Class: Cairo::RadialPattern
- Inherits:
-
GradientPattern
- Object
- Pattern
- GradientPattern
- Cairo::RadialPattern
- Defined in:
- ext/cairo/rb_cairo_pattern.c
Instance Method Summary collapse
- #circles ⇒ Object
- #initialize ⇒ Object constructor
Methods inherited from GradientPattern
#add_color_stop, #color_stop_count, #get_color_stop_color, #get_color_stop_rgba
Methods inherited from Pattern
#extend, #filter, gradient_supported?, linear_supported?, #matrix, mesh_supported?, radial_supported?, raster_source_supported?, #set_extend, #set_filter, #set_matrix, solid_supported?, supported?, surface_supported?
Constructor Details
#initialize ⇒ Object
282 283 284 285 286 287 288 289 290 291 292 293 294 295 |
# File 'ext/cairo/rb_cairo_pattern.c', line 282 static VALUE cr_radial_pattern_initialize (VALUE self, VALUE cx0, VALUE cy0, VALUE radius0, VALUE cx1, VALUE cy1, VALUE radius1) { cairo_pattern_t *pattern; pattern = cairo_pattern_create_radial (NUM2DBL (cx0), NUM2DBL (cy0), NUM2DBL (radius0), NUM2DBL (cx1), NUM2DBL (cy1), NUM2DBL (radius1)); cr_pattern_check_status (pattern); DATA_PTR (self) = pattern; return Qnil; } |
Instance Method Details
#circles ⇒ Object
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 |
# File 'ext/cairo/rb_cairo_pattern.c', line 487 static VALUE cr_radial_pattern_get_radial_circles (VALUE self) { cairo_status_t status; double x0, y0, r0, x1, y1, r1; status = cairo_pattern_get_radial_circles (_SELF (self), &x0, &y0, &r0, &x1, &y1, &r1); rb_cairo_check_status (status); return rb_ary_new3 (2, rb_ary_new3 (3, rb_float_new (x0), rb_float_new (y0), rb_float_new (r0)), rb_ary_new3 (3, rb_float_new (x1), rb_float_new (y1), rb_float_new (r1))); } |