Class SolidPattern

A solid pattern.

Use the fromRGB and fromRGBA methods to create an instance.

Inherits from

Constructors

Name Description
this Create a SolidPattern from a existing cairo_pattern_t*. SolidPattern is a garbage collected class. It will call cairo_pattern_destroy when it gets collected by the GC or when dispose() is called.

Properties

Name Type Description
rgba [get] RGBA Convenience property (todo: dubious due to lowercase requirement)
matrix [get, set] Matrix Convenience property
type [get] cairo_pattern_type_t Convenience property

Methods

Name Description
fromRGB Creates a new SolidPattern corresponding to an opaque color. The color components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped.
fromRGBA Creates a new SolidPattern corresponding to a translucent color. The color components are floating point numbers in the range 0 to 1. If the values passed in are outside that range, they will be clamped.
getRGBA Gets the solid color for a solid color pattern.
createFromNative The createFromNative method for the Pattern classes. See https://github.com/jpf91/cairoD/wiki/Memory-Management#createFromNative for more information.
filter Convenience property
getExtend Gets the current extend mode for a pattern. See Extend for details on the semantics of each extend strategy.
getFilter Gets the current filter for a pattern. See Filter for details on each filter.
getMatrix Returns the pattern's transformation matrix.
getType This function returns the C type of a pattern. See PatternType for available types.
setExtend Sets the mode to be used for drawing outside the area of a pattern. See Extend for details on the semantics of each extend strategy. The default extend mode is CAIRO_EXTEND_NONE for surface patterns and CAIRO_EXTEND_PAD for gradient patterns.
setFilter Sets the filter to be used for resizing when using this pattern. See Filter for details on each filter.
setMatrix Sets the pattern's transformation matrix to matrix. This matrix is a transformation from user space to pattern space.
checkError Method for use in subclasses. Calls cairo_pattern_status(nativePointer) and throws an exception if the status isn't CAIRO_STATUS_SUCCESS

Templates

Name Description
CairoCountedClass!(cairo_pattern_t*, "cairo_pattern_")

Authors

Johannes Pfau cairoD
Andrej Mitrovic cairoD
cairo team cairo

Copyright

License

cairoD wrapper/bindings Boost License 1.0
cairo LGPL 2.1 / MPL 1.1