class Cairo::Pattern
Public Class Methods
gradient_supported?()
click to toggle source
static VALUE cr_pattern_gradient_supported_p (VALUE klass) { return Qtrue; }
linear_supported?()
click to toggle source
static VALUE cr_pattern_linear_supported_p (VALUE klass) { return Qtrue; }
mesh_supported?()
click to toggle source
static VALUE cr_pattern_mesh_supported_p (VALUE klass) { #ifdef RB_CAIRO_HAS_MESH_PATTERN return Qtrue; #else return Qfalse; #endif }
new(*args)
click to toggle source
static VALUE cr_pattern_initialize (int argc, VALUE *argv, VALUE self) { rb_raise(rb_eNotImpError, "%s class instantiation isn't supported on this cairo installation", rb_obj_classname(self)); return Qnil; }
radial_supported?()
click to toggle source
static VALUE cr_pattern_radial_supported_p (VALUE klass) { return Qtrue; }
raster_source_supported?()
click to toggle source
static VALUE cr_pattern_raster_source_supported_p (VALUE klass) { #ifdef RB_CAIRO_HAS_RASTER_SOURCE_PATTERN return Qtrue; #else return Qfalse; #endif }
solid_supported?()
click to toggle source
static VALUE cr_pattern_solid_supported_p (VALUE klass) { return Qtrue; }
supported?(type)
click to toggle source
# File lib/cairo/pattern.rb, line 4 def supported?(type) type = type.to_s.gsub(/([a-z])([A-Z])/, '\\1_\\2').downcase supported_predicate = "#{type}_supported?" return false unless respond_to?(supported_predicate) send(supported_predicate) end
surface_supported?()
click to toggle source
static VALUE cr_pattern_surface_supported_p (VALUE klass) { return Qtrue; }
Public Instance Methods
extend()
click to toggle source
static VALUE cr_pattern_get_extend (VALUE self) { return INT2NUM (cairo_pattern_get_extend (_SELF (self))); }
Also aliased as: __extend__
filter()
click to toggle source
static VALUE cr_pattern_get_filter (VALUE self) { return INT2NUM (cairo_pattern_get_filter (_SELF (self))); }
matrix()
click to toggle source
static VALUE cr_pattern_get_matrix (VALUE self) { cairo_matrix_t matrix; cairo_pattern_get_matrix (_SELF (self), &matrix); cr_pattern_check_status (_SELF (self)); return CRMATRIX2RVAL (&matrix); }
set_extend(p1)
click to toggle source
static VALUE cr_pattern_set_extend (VALUE self, VALUE extend) { cairo_pattern_set_extend (_SELF (self), RVAL2CREXTEND (extend)); cr_pattern_check_status (_SELF (self)); return self; }
set_filter(p1)
click to toggle source
static VALUE cr_pattern_set_filter (VALUE self, VALUE filter) { cairo_pattern_set_filter (_SELF (self), RVAL2CRFILTER (filter)); cr_pattern_check_status (_SELF (self)); return self; }
set_matrix(p1)
click to toggle source
static VALUE cr_pattern_set_matrix (VALUE self, VALUE matrix) { cairo_pattern_set_matrix (_SELF (self), RVAL2CRMATRIX (matrix)); cr_pattern_check_status (_SELF (self)); return self; }