Class: Tioga::Arcs_and_Circles
- Inherits:
-
Object
- Object
- Tioga::Arcs_and_Circles
- Defined in:
- lib/Tioga/Arcs_and_Circles.rb
Overview
These are the methods for creating and using arcs and circles in PDF graphics.
Instance Method Summary collapse
-
#append_arc_to_path(x_start, y_start, x_corner, y_corner, x_end, y_end, dx, dy) ⇒ Object
Like adding lines from start to corner to end, but with the corner rounded with a radius equal to the minimum of the actual output distances for dx and dy.
-
#append_circle_to_path(x, y, r) ⇒ Object
Create a circle with center at (x, y) having radius r (given in x units).
-
#append_oval_to_path(x, y, dx, dy, angle) ⇒ Object
Equivalent to the following: create a unit circle with center at (x, y), scale it by dx in the x direction, scale it by dy in the y direction, then rotate it counter-clockwise by angle degrees.
-
#clip_circle(x, y, r) ⇒ Object
Calls append_circle_to_path followed by #clip.
-
#clip_oval(x, y, dx, dy, angle) ⇒ Object
Calls append_oval_to_path followed by #clip.
-
#fill_and_stroke_circle(x, y, r) ⇒ Object
Calls append_circle_to_path followed by fill_and_stroke.
-
#fill_and_stroke_oval(x, y, dx, dy, angle) ⇒ Object
Calls append_oval_to_path followed by fill_and_stroke.
-
#fill_circle(x, y, r) ⇒ Object
Calls append_circle_to_path followed by #fill.
-
#fill_oval(x, y, dx, dy, angle) ⇒ Object
Calls append_oval_to_path followed by #fill.
-
#stroke_circle(x, y, r) ⇒ Object
Calls append_circle_to_path followed by #stroke.
-
#stroke_oval(x, y, dx, dy, angle) ⇒ Object
Calls append_oval_to_path followed by #stroke.
Instance Method Details
#append_arc_to_path(x_start, y_start, x_corner, y_corner, x_end, y_end, dx, dy) ⇒ Object
Like adding lines from start to corner to end, but with the corner rounded with a radius equal to the minimum of the actual output distances for dx and dy.
The illustration shows in dark blue the arc that is added for the control points given in red.
16 17 |
# File 'lib/Tioga/Arcs_and_Circles.rb', line 16 def append_arc_to_path(x_start, y_start, x_corner, y_corner, x_end, y_end, dx, dy) end |
#append_circle_to_path(x, y, r) ⇒ Object
Create a circle with center at (x, y) having radius r (given in x units).
20 21 |
# File 'lib/Tioga/Arcs_and_Circles.rb', line 20 def append_circle_to_path(x, y, r) end |
#append_oval_to_path(x, y, dx, dy, angle) ⇒ Object
Equivalent to the following: create a unit circle with center at (x, y), scale it by dx in the x direction, scale it by dy in the y direction, then rotate it counter-clockwise by angle degrees.
41 42 |
# File 'lib/Tioga/Arcs_and_Circles.rb', line 41 def append_oval_to_path(x, y, dx, dy, angle) end |
#clip_circle(x, y, r) ⇒ Object
Calls append_circle_to_path followed by #clip.
24 25 |
# File 'lib/Tioga/Arcs_and_Circles.rb', line 24 def clip_circle(x, y, r) end |
#clip_oval(x, y, dx, dy, angle) ⇒ Object
Calls append_oval_to_path followed by #clip.
45 46 |
# File 'lib/Tioga/Arcs_and_Circles.rb', line 45 def clip_oval(x, y, dx, dy, angle) end |
#fill_and_stroke_circle(x, y, r) ⇒ Object
Calls append_circle_to_path followed by fill_and_stroke.
36 37 |
# File 'lib/Tioga/Arcs_and_Circles.rb', line 36 def fill_and_stroke_circle(x, y, r) end |
#fill_and_stroke_oval(x, y, dx, dy, angle) ⇒ Object
Calls append_oval_to_path followed by fill_and_stroke.
57 58 |
# File 'lib/Tioga/Arcs_and_Circles.rb', line 57 def fill_and_stroke_oval(x, y, dx, dy, angle) end |
#fill_circle(x, y, r) ⇒ Object
Calls append_circle_to_path followed by #fill.
28 29 |
# File 'lib/Tioga/Arcs_and_Circles.rb', line 28 def fill_circle(x, y, r) end |
#fill_oval(x, y, dx, dy, angle) ⇒ Object
Calls append_oval_to_path followed by #fill.
49 50 |
# File 'lib/Tioga/Arcs_and_Circles.rb', line 49 def fill_oval(x, y, dx, dy, angle) end |
#stroke_circle(x, y, r) ⇒ Object
Calls append_circle_to_path followed by #stroke.
32 33 |
# File 'lib/Tioga/Arcs_and_Circles.rb', line 32 def stroke_circle(x, y, r) end |
#stroke_oval(x, y, dx, dy, angle) ⇒ Object
Calls append_oval_to_path followed by #stroke.
53 54 |
# File 'lib/Tioga/Arcs_and_Circles.rb', line 53 def stroke_oval(x, y, dx, dy, angle) end |