Enumerations

The following enumerations are available globally.

  • Describes how pixel bits encode color. A pixel may be an alpha mask, a grayscale, Red Green and Blue (RGB), or Alpha, Red, Green and Blue (ARGB)

    See more

    Declaration

    Swift

    public enum ColorType : UInt32
  • Describes how to interpret the alpha component of a pixel. A pixel may be opaque, or alpha, describing multiple levels of transparency. In simple blending, alpha weights the draw color and the destination color to create a new color. If alpha describes a weight from zero to one: new color = draw color * alpha + destination color * (1 - alpha) In practice alpha is encoded in two or more bits, where 1.0 equals all bits set. RGB may have alpha included in each component value; the stored value is the original RGB multiplied by alpha. Premultiplied color components improve performance.

    See more

    Declaration

    Swift

    public enum AlphaType : UInt32
  • Blending modes for compositing digital images. These are an implementation of the Porter Duff blending modes

    See more

    Declaration

    Swift

    public enum BlendMode : UInt32
  • Controls how much filtering to be done when scaling/transforming complex colors

    See more

    Declaration

    Swift

    public enum FilterQuality : UInt32
  • TextAlign adjusts the text relative to the text position. TextAlign affects glyphs drawn with: Canvas.drawText, Canvas.drawPosText, Canvas.drawPosTextH, Canvas.drawTextOnPath, Canvas.drawTextOnPathHV, Canvas.rawTextRSXform, Canvas.drawTextBlob, and Canvas.drawString; as well as calls that place text glyphs like getTextWidths() and getTextPath().

    The text position is set by the font for both horizontal and vertical text. Typically, for horizontal text, the position is to the left side of the glyph on the base line; and for vertical text, the position is the horizontal center of the glyph at the caps height.

    Align adjusts the glyph position to center it or move it to abut the position using the metrics returned by the font.

    Align defaults to .left.

    See more

    Declaration

    Swift

    public enum TextAlign : UInt32
  • TextEncoding determines whether text specifies character codes and their encoded size, or glyph indices. Characters are encoded as specified by the Unicode standard.

    Character codes encoded size are specified by UTF-8, UTF-16, or UTF-32. All character code formats are able to represent all of Unicode, differing only in the total storage required.

    UTF-8 (RFC 3629) encodes each character as one or more 8-bit bytes.

    UTF-16 (RFC 2781) encodes each character as one or two 16-bit words.

    UTF-32 encodes each character as one 32-bit word.

    font manager uses font data to convert character code points into glyph indices. A glyph index is a 16-bit word.

    TextEncoding is set to .utf8 by default.

    See more

    Declaration

    Swift

    public enum TextEncoding : UInt32
  • Undocumented

    See more

    Declaration

    Swift

    public enum ClipOperation : UInt32
  • Selects if an array of points are drawn as discrete points, as lines, or as an open polygon.

    See more

    Declaration

    Swift

    public enum PointMode : UInt32
  • Undocumented

    See more

    Declaration

    Swift

    public enum TransferFunctionBehavior : UInt32
  • Enum describing format of encoded data.

    See more

    Declaration

    Swift

    public enum EncodedImageFormat : UInt32
  • Refers to the density of a typeface, in terms of the lightness or heaviness of the strokes.

    A font weight describes the relative weight of a font, in terms of the lightness or heaviness of the strokes. Weight differences are generally differentiated by an increased stroke or thickness that is associated with a given character in a font, as compared to a normal character from that same font.

    The FontWeights values correspond to the usWeightClass definition in the OpenType specification. The usWeightClass represents an integer value between 1 and 999. Lower values indicate lighter weights; higher values indicate heavier weights.

    The numerical value of the enumeration is the usWeightClass

    See more

    Declaration

    Swift

    public enum FontStyleWeight : Int32
  • Predefined font widths for use with Typeface, these values match the usWidthClass from the OpenType specification. These are numbers from 1 to 9, lower numbers represent narrower widths, higher numbers indicate wider widths.

    See more

    Declaration

    Swift

    public enum FontStyleWidth : Int32
  • Font slants for use with Typeface.

    See more

    Declaration

    Swift

    public enum FontStyleSlant : UInt32
  • Indications on how the shader should handle drawing outside the original bounds.

    See more

    Declaration

    Swift

    public enum ShaderTileMode : UInt32
  • Undocumented

    See more

    Declaration

    Swift

    public enum SKSurfacePropsFlags : UInt32
  • Description of how the LCD strips are arranged for each pixel. If this is unknown, or the pixels are meant to be portable and/or transformed before showing (e.g. rotated, scaled) then use .unknown

    See more

    Declaration

    Swift

    public enum PixelGeometry : UInt32
  • The logical operations that can be performed when combining two regions.

    See more

    Declaration

    Swift

    public enum RegionOperation : UInt32