Structures

The following structures are available globally.

  • Describes pixel dimensions and encoding. Bitmap, Image, Pixmap, and Surface can be created from ImageInfo. ImageInfo can be retrieved from Bitmap and Pixmap, but not from Image and Surface. For example, Image and Surface implementations may defer pixel depth, so may not completely specify ImageInfo.

    ImageInfo contains dimensions, the pixel integral width and height. It encodes how pixel bits describe alpha, transparency; color components red, blue, and green; and ColorSpace, the range and linearity of colors.

    See more

    Declaration

    Swift

    public struct ImageInfo
  • Matrix holds a 3x3 matrix for transforming coordinates. This allows mapping Point and vectors with translation, scaling, skewing, rotation, and perspective. Matrix elements are in row major order. Matrix does not have a constructor, so it must be explicitly initialized. setIdentity() initializes Matrix so it has no effect. setTranslate(), setScale(), setew(), setRotate(), set9 and setAll() initializes all Matrix elements with the corresponding mapping. Matrix includes a hidden variable that classifies the type of matrix to improve performance. Matrix is not thread safe unless getType() is called first.

    You can either create the matrix by using one of the constuctors, or using some of the convenience static methods that start with make

    See more

    Declaration

    Swift

    public struct Matrix