
The default for lineWidth, when antialiasing is off, is defined within the ASCIImage library. To use the ASCII diagram image support, see and. An hs.image object, or nil if an error occured. Each index consists of a table which can contain one or more of the following keys: * fillColor - the color with which the shape will be filled (defaults to black) Color is defined in a table containing color component values between 0.0 and 1.0 for each of the keys: * red (default 0.0) * green (default 0.0) * blue (default 0.0) * alpha (default 1.0) * strokeColor - the color with which the shape will be stroked (defaults to black) * lineWidth - the line width (number) for the stroke of the shape (defaults to 1 if anti-aliasing is on or (√2)/2 if it is off - approximately 0.7) * shouldClose - a boolean indicating whether or not the shape should be closed (defaults to true) * antialias - a boolean indicating whether or not the shape should be antialiased (defaults to true). The last (highest) numbered index in the sparse array specifies the default settings for any unspecified index and any settings which are not explicitly set in any other given index. The context table is an optional (possibly sparse) array in which the index represents the order in which the shapes are defined. A shape is considered a single drawing element (point, ellipse, line, or polygon) as defined at and. context - An optional table containing the context for each shape in the image. ascii - A string containing a representation of an image. Hs.image.imageFromASCII(ascii) -> objectĬreates an image from an ASCII representation with the specified context. An hs.image object or nil, if no app icon was found. bundleID - A string containing the bundle identifier of an application. Hs.image.imageFromAppBundle(bundleID) -> objectĬreates an `hs.image` object using the icon from an App An hs.image object or nil, if there was an error. fileType - the file type, specified as a filename extension or a universal type identifier (UTI). Hs.image.iconForFileType(fileType) -> objectĬreates an `hs.image` object of the icon for the specified file type. The image will be the icon for the specified file or an icon representing multiple files if an array of multiple files is specified. An hs.image object or nil, if there was an error. file - the path to a file or an array of files to generate an icon for. A table of EXIF metadata, or nil if no metadata can be found or the file path is invalid.Ĭreates an `hs.image` object for the file or files specified. Gets the EXIF metadata information from an image file. Hs.image.getExifFromPath(path) -> table | nil This table has a _tostring() metamethod which allows listing it's contents in the Hammerspoon console by typing hs.image.systemImageNames. Table containing the names of internal system images for use with hs.drawing.image If you identify any images which may be missing or could be added, please file an issue at. As these image names are (for the most part) not formally listed in Apple's documentation or published APIs, their use cannot be guaranteed across all OS X versions. The list of these images was pulled from a collection located in the repositories at. Table of arrays containing the names of additional internal system images which may also be available for use with `hs.drawing.image` and (#imageFromName). Methods - API calls which can only be made on an object returned by a constructorĪPI Documentation Constants additionalImageNames Signature.
Constructors - API calls which return an object, typically one that offers API methods.
Functions - API calls offered directly by the extension.Constants - Useful values which cannot be changed.Hammerspoon docs: hs.image docs » hs.imageĪ module for capturing and manipulating image objects from other modules for use with hs.drawing.