Class: Cairo::TextExtents
- Inherits:
-
Object
- Object
- Cairo::TextExtents
- Defined in:
- ext/cairo/rb_cairo_text_extents.c
Instance Method Summary collapse
- #height ⇒ Object
- #initialize ⇒ Object constructor
- #set_height ⇒ Object
- #set_width ⇒ Object
- #set_x_advance ⇒ Object
- #set_x_bearing ⇒ Object
- #set_y_advance ⇒ Object
- #set_y_bearing ⇒ Object
- #to_s ⇒ Object
- #width ⇒ Object
- #x_advance ⇒ Object
- #x_bearing ⇒ Object
- #y_advance ⇒ Object
- #y_bearing ⇒ Object
Constructor Details
#initialize ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 72 static VALUE cr_text_extents_initialize (VALUE self) { cairo_text_extents_t *extents; extents = ALLOC (cairo_text_extents_t); extents->x_bearing = 0.0; extents->y_bearing = -1.0; extents->width = 0.0; extents->height = 1.0; extents->x_advance = 1.0; extents->y_advance = 0.0; RTYPEDDATA_DATA (self) = extents; return Qnil; } |
Instance Method Details
#height ⇒ Object
129 130 131 132 133 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 129 static VALUE cr_text_extents_height (VALUE self) { return rb_float_new (_SELF(self)->height); } |
#set_height ⇒ Object
135 136 137 138 139 140 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 135 static VALUE cr_text_extents_set_height (VALUE self, VALUE height) { _SELF(self)->height = NUM2DBL (height); return Qnil; } |
#set_width ⇒ Object
122 123 124 125 126 127 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 122 static VALUE cr_text_extents_set_width (VALUE self, VALUE width) { _SELF(self)->width = NUM2DBL (width); return Qnil; } |
#set_x_advance ⇒ Object
148 149 150 151 152 153 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 148 static VALUE cr_text_extents_set_x_advance (VALUE self, VALUE x_advance) { _SELF(self)->x_advance = NUM2DBL (x_advance); return Qnil; } |
#set_x_bearing ⇒ Object
96 97 98 99 100 101 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 96 static VALUE cr_text_extents_set_x_bearing (VALUE self, VALUE x_bearing) { _SELF(self)->x_bearing = NUM2DBL (x_bearing); return Qnil; } |
#set_y_advance ⇒ Object
161 162 163 164 165 166 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 161 static VALUE cr_text_extents_set_y_advance (VALUE self, VALUE y_advance) { _SELF(self)->y_advance = NUM2DBL (y_advance); return Qnil; } |
#set_y_bearing ⇒ Object
109 110 111 112 113 114 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 109 static VALUE cr_text_extents_set_y_bearing (VALUE self, VALUE y_bearing) { _SELF(self)->y_bearing = NUM2DBL (y_bearing); return Qnil; } |
#to_s ⇒ Object
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 168 static VALUE cr_text_extents_to_s (VALUE self) { VALUE ret; ret = rb_str_new2 ("#<"); rb_str_cat2 (ret, rb_class2name (CLASS_OF (self))); rb_str_cat2 (ret, ": "); rb_str_cat2 (ret, "x_bearing="); rb_str_concat (ret, rb_inspect (cr_text_extents_x_bearing (self))); rb_str_cat2 (ret, ", "); rb_str_cat2 (ret, "y_bearing="); rb_str_concat (ret, rb_inspect (cr_text_extents_y_bearing (self))); rb_str_cat2 (ret, ", "); rb_str_cat2 (ret, "width="); rb_str_concat (ret, rb_inspect (cr_text_extents_width (self))); rb_str_cat2 (ret, ", "); rb_str_cat2 (ret, "height="); rb_str_concat (ret, rb_inspect (cr_text_extents_height (self))); rb_str_cat2 (ret, ", "); rb_str_cat2 (ret, "x_advance="); rb_str_concat (ret, rb_inspect (cr_text_extents_x_advance (self))); rb_str_cat2 (ret, ", "); rb_str_cat2 (ret, "y_advance="); rb_str_concat (ret, rb_inspect (cr_text_extents_y_advance (self))); rb_str_cat2 (ret, ">"); return ret; } |
#width ⇒ Object
116 117 118 119 120 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 116 static VALUE cr_text_extents_width (VALUE self) { return rb_float_new (_SELF(self)->width); } |
#x_advance ⇒ Object
142 143 144 145 146 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 142 static VALUE cr_text_extents_x_advance (VALUE self) { return rb_float_new (_SELF(self)->x_advance); } |
#x_bearing ⇒ Object
90 91 92 93 94 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 90 static VALUE cr_text_extents_x_bearing (VALUE self) { return rb_float_new (_SELF(self)->x_bearing); } |
#y_advance ⇒ Object
155 156 157 158 159 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 155 static VALUE cr_text_extents_y_advance (VALUE self) { return rb_float_new (_SELF(self)->y_advance); } |
#y_bearing ⇒ Object
103 104 105 106 107 |
# File 'ext/cairo/rb_cairo_text_extents.c', line 103 static VALUE cr_text_extents_y_bearing (VALUE self) { return rb_float_new (_SELF(self)->y_bearing); } |