class Cairo::FontOptions
Public Class Methods
new()
click to toggle source
static VALUE
cr_options_create (VALUE self)
{
cairo_font_options_t *options;
options = cairo_font_options_create ();
cr_options_check_status (options);
RTYPEDDATA_DATA (self) = options;
return Qnil;
}
Public Instance Methods
==(p1)
click to toggle source
static VALUE
cr_options_equal (VALUE self, VALUE other)
{
if (!rb_cairo__is_kind_of (other, rb_cCairo_FontOptions))
return Qfalse;
return CBOOL2RVAL (cairo_font_options_equal (_SELF (self), _SELF (other)));
}
Also aliased as: eql?
antialias()
click to toggle source
static VALUE
cr_options_get_antialias (VALUE self)
{
return INT2NUM (cairo_font_options_get_antialias (_SELF (self)));
}
color_mode()
click to toggle source
static VALUE
cr_options_get_color_mode (VALUE self)
{
return INT2NUM (cairo_font_options_get_color_mode (_SELF (self)));
}
color_palette()
click to toggle source
static VALUE
cr_options_get_color_palette (VALUE self)
{
return UINT2NUM (cairo_font_options_get_color_palette (_SELF (self)));
}
dup()
click to toggle source
static VALUE
cr_options_copy (VALUE self)
{
return CRFONTOPTIONS2RVAL (_SELF (self));
}
hash()
click to toggle source
static VALUE
cr_options_hash (VALUE self)
{
return ULONG2NUM (cairo_font_options_hash (_SELF (self)));
}
hint_metrics()
click to toggle source
static VALUE
cr_options_get_hint_metrics (VALUE self)
{
return INT2NUM (cairo_font_options_get_hint_metrics (_SELF (self)));
}
hint_style()
click to toggle source
static VALUE
cr_options_get_hint_style (VALUE self)
{
return INT2NUM (cairo_font_options_get_hint_style (_SELF (self)));
}
merge(other)
click to toggle source
# File lib/cairo.rb, line 112 def merge(other) dup.merge!(other) end
merge!(p1)
click to toggle source
static VALUE
cr_options_merge (VALUE self, VALUE other)
{
cairo_font_options_merge (_SELF (self), _SELF (other));
return self;
}
Also aliased as: update
set_antialias(p1)
click to toggle source
static VALUE
cr_options_set_antialias (VALUE self, VALUE antialias)
{
cairo_font_options_set_antialias (_SELF (self), RVAL2CRANTIALIAS (antialias));
return self;
}
set_color_mode(p1)
click to toggle source
static VALUE
cr_options_set_color_mode (VALUE self, VALUE mode)
{
cairo_font_options_set_color_mode (_SELF (self),
RVAL2CRCOLORMODE (mode));
return self;
}
set_color_palette(p1)
click to toggle source
static VALUE
cr_options_set_color_palette (VALUE self, VALUE index)
{
cairo_font_options_set_color_palette (_SELF (self),
NUM2UINT (index));
return self;
}
set_custom_palette_color(p1, p2, p3, p4, p5)
click to toggle source
static VALUE
cr_options_set_custom_palette_color (VALUE self,
VALUE index,
VALUE red,
VALUE green,
VALUE blue,
VALUE alpha)
{
cairo_font_options_set_custom_palette_color (_SELF (self),
NUM2UINT (index),
NUM2DBL (red),
NUM2DBL (green),
NUM2DBL (blue),
NUM2DBL (alpha));
return self;
}
set_hint_metrics(p1)
click to toggle source
static VALUE
cr_options_set_hint_metrics (VALUE self, VALUE hint_metrics)
{
cairo_font_options_set_hint_metrics (_SELF (self),
RVAL2CRHINTMETRICS (hint_metrics));
return self;
}
set_hint_style(p1)
click to toggle source
static VALUE
cr_options_set_hint_style (VALUE self, VALUE hint_style)
{
cairo_font_options_set_hint_style (_SELF (self),
RVAL2CRHINTSTYLE (hint_style));
return self;
}
set_subpixel_order(p1)
click to toggle source
static VALUE
cr_options_set_subpixel_order (VALUE self, VALUE subpixel_order)
{
cairo_font_options_set_subpixel_order (_SELF (self),
RVAL2CRSUBPIXELORDER (subpixel_order));
return self;
}
set_variations(p1)
click to toggle source
static VALUE
cr_options_set_variations (VALUE self, VALUE variations)
{
cairo_font_options_set_variations (_SELF (self),
RVAL2CSTR (variations));
return self;
}
subpixel_order()
click to toggle source
static VALUE
cr_options_get_subpixel_order (VALUE self)
{
return INT2NUM (cairo_font_options_get_subpixel_order (_SELF (self)));
}
variations()
click to toggle source
static VALUE
cr_options_get_variations (VALUE self)
{
const char *variations;
variations = cairo_font_options_get_variations (_SELF (self));
if (!variations)
return Qnil;
return CSTR2RVAL (variations);
}