W Wrapl, The Programming Language

Libraries:Gtk:Cairo:Pattern

Types

T

Constants

Nil : T

Functions

CreateForSurface(surface @ Gtk.Cairo.Surface.T) : Gtk.Cairo.Pattern.T

Create a new T for the given surface.

surface the surface
Returns the newly created T if successful, or an error pattern in case of no memory. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. This function will always return a valid pointer, but if an error occurred the pattern status will be set to an error. To inspect the status of a pattern use cairo_pattern_status().


CreateLinear(x0 @ Std.Real.T, y0 @ Std.Real.T, x1 @ Std.Real.T, y1 @ Std.Real.T) : Gtk.Cairo.Pattern.T

Create a new linear gradient T along the line defined by (x0, y0) and (x1, y1). Before using the gradient pattern, a number of color stops should be defined using cairo_pattern_add_color_stop_rgb() or cairo_pattern_add_color_stop_rgba().

Note: The coordinates here are in pattern space. For a new pattern, pattern space is identical to user space, but the relationship between the spaces can be changed with cairo_pattern_set_matrix().

x0 x coordinate of the start point
y0 y coordinate of the start point
x1 x coordinate of the end point
y1 y coordinate of the end point
Returns the newly created T if successful, or an error pattern in case of no memory. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. This function will always return a valid pointer, but if an error occurred the pattern status will be set to an error. To inspect the status of a pattern use cairo_pattern_status().


CreateRadial(cx0 @ Std.Real.T, cy0 @ Std.Real.T, radius0 @ Std.Real.T, cx1 @ Std.Real.T, cy1 @ Std.Real.T, radius1 @ Std.Real.T) : Gtk.Cairo.Pattern.T

Creates a new radial gradient T between the two circles defined by (cx0, cy0, radius0) and (cx1, cy1, radius1). Before using the gradient pattern, a number of color stops should be defined using cairo_pattern_add_color_stop_rgb() or cairo_pattern_add_color_stop_rgba().

Note: The coordinates here are in pattern space. For a new pattern, pattern space is identical to user space, but the relationship between the spaces can be changed with cairo_pattern_set_matrix().

cx0 x coordinate for the center of the start circle
cy0 y coordinate for the center of the start circle
radius0 radius of the start circle
cx1 x coordinate for the center of the end circle
cy1 y coordinate for the center of the end circle
radius1 radius of the end circle
Returns the newly created T if successful, or an error pattern in case of no memory. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. This function will always return a valid pointer, but if an error occurred the pattern status will be set to an error. To inspect the status of a pattern use cairo_pattern_status().


CreateRgb(red @ Std.Real.T, green @ Std.Real.T, blue @ Std.Real.T) : Gtk.Cairo.Pattern.T

Creates a new T 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.

red red component of the color
green green component of the color
blue blue component of the color
Returns the newly created T if successful, or an error pattern in case of no memory. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. This function will always return a valid pointer, but if an error occurred the pattern status will be set to an error. To inspect the status of a pattern use cairo_pattern_status().


CreateRgba(red @ Std.Real.T, green @ Std.Real.T, blue @ Std.Real.T, alpha @ Std.Real.T) : Gtk.Cairo.Pattern.T

Creates a new T 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.

red red component of the color
green green component of the color
blue blue component of the color
alpha alpha component of the color
Returns the newly created T if successful, or an error pattern in case of no memory. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. This function will always return a valid pointer, but if an error occurred the pattern status will be set to an error. To inspect the status of a pattern use cairo_pattern_status().


Methods

:"="(_ @ T, _ @ T)

:GetType(self @ T) : Gtk.Cairo.PatternType.T

This function returns the type a pattern. See Gtk.Cairo.PatternType.T for available types.

pattern a T
Returns The type of pattern.


:"~="(_ @ T, _ @ T)