The OpenD Programming Language

SolidPattern

A solid pattern.

Use the fromRGB and fromRGBA methods to create an instance.

Constructors

this
this(cairo_pattern_t* ptr)

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.

Members

Functions

getRGBA
RGBA getRGBA()

Gets the solid color for a solid color pattern.

Properties

rgba
RGBA rgba [@property getter]

Convenience property (todo: dubious due to lowercase requirement)

Static functions

fromRGB
SolidPattern fromRGB(double red, double green, double blue)
SolidPattern fromRGB(RGB rgb)

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
SolidPattern fromRGBA(double red, double green, double blue, double alpha)
SolidPattern fromRGBA(RGBA rgba)

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.

Inherited Members

From Pattern

__anonymous
mixin CairoCountedClass!(cairo_pattern_t*, "cairo_pattern_")
checkError
void checkError()

Method for use in subclasses. Calls cairo_pattern_status(nativePointer) and throws an exception if the status isn't CAIRO_STATUS_SUCCESS

createFromNative
Pattern createFromNative(cairo_pattern_t* ptr, bool adjRefCount)

The createFromNative method for the Pattern classes. See https://github.com/jpf91/cairoD/wiki/Memory-Management#createFromNative for more information.

setExtend
void setExtend(Extend ext)

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.

getExtend
Extend getExtend()

Gets the current extend mode for a pattern. See Extend for details on the semantics of each extend strategy.

setFilter
void setFilter(Filter fil)

Sets the filter to be used for resizing when using this pattern. See Filter for details on each filter.

getFilter
Filter getFilter()

Gets the current filter for a pattern. See Filter for details on each filter.

filter
void filter(Filter fil)
Filter filter()

Convenience property

setMatrix
void setMatrix(Matrix mat)

Sets the pattern's transformation matrix to matrix. This matrix is a transformation from user space to pattern space.

getMatrix
Matrix getMatrix()

Returns the pattern's transformation matrix.

matrix
Matrix matrix [@property setter]
Matrix matrix [@property getter]

Convenience property

getType
PatternType getType()

This function returns the C type of a pattern. See PatternType for available types.

type
PatternType type [@property getter]

Convenience property

Meta