Protocols

The following protocols are available globally.

Context Record

  • The ContextProtocol protocol exposes the methods and properties of an underlying cairo_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Context. Alternatively, use ContextRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol ContextProtocol

Device Record

  • The DeviceProtocol protocol exposes the methods and properties of an underlying cairo_device_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Device. Alternatively, use DeviceRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol DeviceProtocol

FontOptions Record

  • The FontOptionsProtocol protocol exposes the methods and properties of an underlying cairo_font_options_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see FontOptions. Alternatively, use FontOptionsRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol FontOptionsProtocol

FontFace Record

  • The FontFaceProtocol protocol exposes the methods and properties of an underlying cairo_font_face_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see FontFace. Alternatively, use FontFaceRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol FontFaceProtocol

Matrix Record

  • The MatrixProtocol protocol exposes the methods and properties of an underlying cairo_matrix_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Matrix. Alternatively, use MatrixRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol MatrixProtocol

Pattern Record

  • The PatternProtocol protocol exposes the methods and properties of an underlying cairo_pattern_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Pattern. Alternatively, use PatternRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol PatternProtocol

Path Record

  • The PathProtocol protocol exposes the methods and properties of an underlying cairo_path_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Path. Alternatively, use PathRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol PathProtocol

Region Record

  • The RegionProtocol protocol exposes the methods and properties of an underlying cairo_region_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Region. Alternatively, use RegionRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol RegionProtocol

Rectangle Record

  • The RectangleProtocol protocol exposes the methods and properties of an underlying cairo_rectangle_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Rectangle. Alternatively, use RectangleRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol RectangleProtocol

RectangleInt Record

  • The RectangleIntProtocol protocol exposes the methods and properties of an underlying cairo_rectangle_int_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see RectangleInt. Alternatively, use RectangleIntRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol RectangleIntProtocol

Surface Record

  • The SurfaceProtocol protocol exposes the methods and properties of an underlying cairo_surface_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Surface. Alternatively, use SurfaceRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol SurfaceProtocol

ScaledFont Record

  • The ScaledFontProtocol protocol exposes the methods and properties of an underlying cairo_scaled_font_t instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see ScaledFont. Alternatively, use ScaledFontRef as a lighweight, unowned reference if you already have an instance you just want to use.

    See more

    Declaration

    Swift

    public protocol ScaledFontProtocol