Class: Cairo::Context
- Inherits:
-
Object
- Object
- Cairo::Context
- Defined in:
- lib/gir_ffi-cairo/context.rb
Overview
Overrides for CairoContext (cairo_t)
Class Method Summary collapse
Instance Method Summary collapse
- #arc(xc, yc, radius, angle1, angle2) ⇒ Object
- #close_path ⇒ Object
- #fill ⇒ Object
- #get_target ⇒ Object
- #line_to(x, y) ⇒ Object
- #move_to(x, y) ⇒ Object
- #rectangle(x, y, width, height) ⇒ Object
- #restore ⇒ Object
- #save ⇒ Object
- #set_source_rgba(red, green, blue, alpha) ⇒ Object
- #show_page ⇒ Object
- #stroke ⇒ Object
Class Method Details
.create(target) ⇒ Object
8 9 10 11 |
# File 'lib/gir_ffi-cairo/context.rb', line 8 def self.create(target) ptr = Lib.cairo_create target wrap ptr end |
Instance Method Details
#arc(xc, yc, radius, angle1, angle2) ⇒ Object
29 30 31 |
# File 'lib/gir_ffi-cairo/context.rb', line 29 def arc(xc, yc, radius, angle1, angle2) Lib.cairo_arc self, xc, yc, radius, angle1, angle2 end |
#close_path ⇒ Object
21 22 23 |
# File 'lib/gir_ffi-cairo/context.rb', line 21 def close_path Lib.cairo_close_path self end |
#fill ⇒ Object
33 34 35 |
# File 'lib/gir_ffi-cairo/context.rb', line 33 def fill Lib.cairo_fill self end |
#get_target ⇒ Object
41 42 43 44 |
# File 'lib/gir_ffi-cairo/context.rb', line 41 def get_target ptr = Lib.cairo_get_target self Surface.wrap ptr end |
#line_to(x, y) ⇒ Object
17 18 19 |
# File 'lib/gir_ffi-cairo/context.rb', line 17 def line_to(x, y) Lib.cairo_line_to self, x, y end |
#move_to(x, y) ⇒ Object
13 14 15 |
# File 'lib/gir_ffi-cairo/context.rb', line 13 def move_to(x, y) Lib.cairo_move_to self, x, y end |
#rectangle(x, y, width, height) ⇒ Object
25 26 27 |
# File 'lib/gir_ffi-cairo/context.rb', line 25 def rectangle(x, y, width, height) Lib.cairo_rectangle self, x, y, width, height end |
#restore ⇒ Object
54 55 56 |
# File 'lib/gir_ffi-cairo/context.rb', line 54 def restore Lib.cairo_restore self end |
#save ⇒ Object
50 51 52 |
# File 'lib/gir_ffi-cairo/context.rb', line 50 def save Lib.cairo_save self end |
#set_source_rgba(red, green, blue, alpha) ⇒ Object
46 47 48 |
# File 'lib/gir_ffi-cairo/context.rb', line 46 def set_source_rgba(red, green, blue, alpha) Lib.cairo_set_source_rgba self, red, green, blue, alpha end |
#show_page ⇒ Object
58 59 60 |
# File 'lib/gir_ffi-cairo/context.rb', line 58 def show_page Lib.cairo_show_page self end |
#stroke ⇒ Object
37 38 39 |
# File 'lib/gir_ffi-cairo/context.rb', line 37 def stroke Lib.cairo_stroke self end |