Created
January 30, 2020 11:00
-
-
Save typemytype/78a26b77eb1c23367cc68f1792153c2f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # runs in drawbot | |
| # shows all names of | |
| import AppKit | |
| names = [n for n in dir(AppKit) if n.startswith("NSImageName")] | |
| for name in names: | |
| im = AppKit.NSImage.imageNamed_(getattr(AppKit, name)) | |
| if im is None: | |
| print(name) | |
| continue | |
| border = 10 | |
| tw, th = textSize(name) | |
| w, h = im.size() | |
| w = max([w, tw]) | |
| newPage(w + border * 2, h + border * 2 + th) | |
| image(im, (border, border + th)) | |
| text(name, (border, border)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment