Class: Cairo::FontOptions
- Inherits:
-
Object
- Object
- Cairo::FontOptions
- Defined in:
- lib/cairo.rb,
ext/cairo/rb_cairo_font_options.c
Instance Method Summary collapse
- #== ⇒ Object
- #antialias ⇒ Object
- #dup ⇒ Object
- #eql? ⇒ Boolean
- #hash ⇒ Object
- #hint_metrics ⇒ Object
- #hint_style ⇒ Object
- #initialize ⇒ Object constructor
- #merge(other) ⇒ Object
- #merge! ⇒ Object (also: #update)
- #set_antialias ⇒ Object
- #set_hint_metrics ⇒ Object
- #set_hint_style ⇒ Object
- #set_subpixel_order ⇒ Object
- #subpixel_order ⇒ Object
Constructor Details
#initialize ⇒ Object
68 69 70 71 72 73 74 75 76 77 |
# File 'ext/cairo/rb_cairo_font_options.c', line 68
static VALUE
cr_options_create (VALUE self)
{
cairo_font_options_t *options;
options = cairo_font_options_create ();
cr_options_check_status (options);
DATA_PTR (self) = options;
return Qnil;
}
|
Instance Method Details
#== ⇒ Object
96 97 98 99 100 101 102 103 |
# File 'ext/cairo/rb_cairo_font_options.c', line 96
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)));
}
|
#antialias ⇒ Object
118 119 120 121 122 |
# File 'ext/cairo/rb_cairo_font_options.c', line 118
static VALUE
cr_options_get_antialias (VALUE self)
{
return INT2NUM (cairo_font_options_get_antialias (_SELF (self)));
}
|
#dup ⇒ Object
79 80 81 82 83 84 85 86 87 |
# File 'ext/cairo/rb_cairo_font_options.c', line 79
static VALUE
cr_options_copy (VALUE self)
{
cairo_font_options_t *options;
options = cairo_font_options_copy (_SELF (self));
cr_options_check_status (options);
return CRFONTOPTIONS2RVAL (options);
}
|
#eql? ⇒ Boolean
96 97 98 99 100 101 102 103 |
# File 'ext/cairo/rb_cairo_font_options.c', line 96
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)));
}
|
#hash ⇒ Object
105 106 107 108 109 |
# File 'ext/cairo/rb_cairo_font_options.c', line 105
static VALUE
cr_options_hash (VALUE self)
{
return INT2NUM (cairo_font_options_hash (_SELF (self)));
}
|
#hint_metrics ⇒ Object
160 161 162 163 164 |
# File 'ext/cairo/rb_cairo_font_options.c', line 160
static VALUE
cr_options_get_hint_metrics (VALUE self)
{
return INT2NUM (cairo_font_options_get_hint_metrics (_SELF (self)));
}
|
#hint_style ⇒ Object
146 147 148 149 150 |
# File 'ext/cairo/rb_cairo_font_options.c', line 146
static VALUE
cr_options_get_hint_style (VALUE self)
{
return INT2NUM (cairo_font_options_get_hint_style (_SELF (self)));
}
|
#merge(other) ⇒ Object
137 138 139 |
# File 'lib/cairo.rb', line 137 def merge(other) dup.merge!(other) end |
#merge! ⇒ Object Also known as: update
89 90 91 92 93 94 |
# File 'ext/cairo/rb_cairo_font_options.c', line 89
static VALUE
cr_options_merge (VALUE self, VALUE other)
{
cairo_font_options_merge (_SELF (self), _SELF (other));
return self;
}
|
#set_antialias ⇒ Object
111 112 113 114 115 116 |
# File 'ext/cairo/rb_cairo_font_options.c', line 111
static VALUE
cr_options_set_antialias (VALUE self, VALUE antialias)
{
cairo_font_options_set_antialias (_SELF (self), RVAL2CRANTIALIAS (antialias));
return self;
}
|
#set_hint_metrics ⇒ Object
152 153 154 155 156 157 158 |
# File 'ext/cairo/rb_cairo_font_options.c', line 152
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 ⇒ Object
138 139 140 141 142 143 144 |
# File 'ext/cairo/rb_cairo_font_options.c', line 138
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 ⇒ Object
124 125 126 127 128 129 130 |
# File 'ext/cairo/rb_cairo_font_options.c', line 124
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;
}
|
#subpixel_order ⇒ Object
132 133 134 135 136 |
# File 'ext/cairo/rb_cairo_font_options.c', line 132
static VALUE
cr_options_get_subpixel_order (VALUE self)
{
return INT2NUM (cairo_font_options_get_subpixel_order (_SELF (self)));
}
|