Sha256: bb37e8f837851de27efd75cdd99242d8f9f41bc8b7a564c7247f34b3b615126a

Contents?: true

Size: 1.75 KB

Versions: 1

Compression:

Stored size: 1.75 KB

Contents

#  Arcs_and_Circles.rb

module Tioga

# These are the methods for creating and using arcs and circles in PDF graphics.

class Arcs_and_Circles < Doc < FigureMaker

# 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.
#
# http://theory.kitp.ucsb.edu/~paxton/tioga_jpegs/append_arc.jpg
#
   def append_arc_to_path(x_start, y_start, x_corner, y_corner, x_end, y_end, dx, dy)
   end

# Create a circle with center at (_x_, _y_) having radius _r_ (given in x units).
   def append_circle_to_path(x, y, r)
   end

# Calls append_circle_to_path followed by #clip.
   def clip_circle(x, y, r)
   end
   
# Calls append_circle_to_path followed by #fill.
   def fill_circle(x, y, r)
   end

# Calls append_circle_to_path followed by #stroke.
   def stroke_circle(x, y, r)
   end

# Calls append_circle_to_path followed by fill_and_stroke.
   def fill_and_stroke_circle(x, y, r)
   end
   
# 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.
   def append_oval_to_path(x, y, dx, dy, angle)
   end

# Calls append_oval_to_path followed by #clip.
   def clip_oval(x, y, dx, dy, angle)
   end
   
# Calls append_oval_to_path followed by #fill.
   def fill_oval(x, y, dx, dy, angle)
   end
   
# Calls append_oval_to_path followed by #stroke.
   def stroke_oval(x, y, dx, dy, angle)
   end

# Calls append_oval_to_path followed by fill_and_stroke.
   def fill_and_stroke_oval(x, y, dx, dy, angle)
   end




end # class
end # module Tioga

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tioga-1.4 split/Tioga/lib/Arcs_and_Circles.rb