Class: Cairo::FontOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/cairo.rb,
ext/cairo/rb_cairo_font_options.c

Instance Method Summary collapse

Constructor Details

#initializeObject



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

#antialiasObject



115
116
117
118
119
# File 'ext/cairo/rb_cairo_font_options.c', line 115

static VALUE
cr_options_get_antialias (VALUE self)
{
  return INT2NUM (cairo_font_options_get_antialias (_SELF (self)));
}

#dupObject



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

Returns:

  • (Boolean)


96
97
98
99
100
# File 'ext/cairo/rb_cairo_font_options.c', line 96

static VALUE
cr_options_equal (VALUE self, VALUE other)
{
  return CBOOL2RVAL (cairo_font_options_equal (_SELF (self), _SELF (other)));
}

#hashObject



102
103
104
105
106
# File 'ext/cairo/rb_cairo_font_options.c', line 102

static VALUE
cr_options_hash (VALUE self)
{
  return INT2NUM (cairo_font_options_hash (_SELF (self)));
}

#hint_metricsObject



157
158
159
160
161
# File 'ext/cairo/rb_cairo_font_options.c', line 157

static VALUE
cr_options_get_hint_metrics (VALUE self)
{
  return INT2NUM (cairo_font_options_get_hint_metrics (_SELF (self)));
}

#hint_styleObject



143
144
145
146
147
# File 'ext/cairo/rb_cairo_font_options.c', line 143

static VALUE
cr_options_get_hint_style (VALUE self)
{
  return INT2NUM (cairo_font_options_get_hint_style (_SELF (self)));
}

#merge(other) ⇒ Object



135
136
137
# File 'lib/cairo.rb', line 135

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_antialiasObject



108
109
110
111
112
113
# File 'ext/cairo/rb_cairo_font_options.c', line 108

static VALUE
cr_options_set_antialias (VALUE self, VALUE antialias)
{
  cairo_font_options_set_antialias (_SELF (self), RVAL2CRANTIALIAS (antialias));
  return self;
}

#set_hint_metricsObject



149
150
151
152
153
154
155
# File 'ext/cairo/rb_cairo_font_options.c', line 149

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_styleObject



135
136
137
138
139
140
141
# File 'ext/cairo/rb_cairo_font_options.c', line 135

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_orderObject



121
122
123
124
125
126
127
# File 'ext/cairo/rb_cairo_font_options.c', line 121

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_orderObject



129
130
131
132
133
# File 'ext/cairo/rb_cairo_font_options.c', line 129

static VALUE
cr_options_get_subpixel_order (VALUE self)
{
  return INT2NUM (cairo_font_options_get_subpixel_order (_SELF (self)));
}