Class RGhost::Polygon
In: polygon.rb
Parent: RGhost::PsObject

Draw one shape based in relative node points.

Options

  • :x and :y - Initial position.
  • :content - Facade to ShapeContent with same parameters.
  • :border - Facade to Border with same parameters.

Examples

 doc.polygon :x => 3.5, :y => 5.5 do
   node :x => 4,  :y => 0
   node :x => 0,  :y => -4
   node :x => -4, :y => 0
   node :x => 0,  :y => 4
 end

 doc.polygon :x => 3.5, :y => 4.5 do
   node :x => 2,  :y => 2
   node :x => 2,  :y => -2
   node :x => -2, :y => -2
 end

 doc.polygon :x => 1, :y => 5, :border => {:width => 2, :linejoin => 1} do
   node :x => 2,  :y => 2/2
   node :x => 2*2,:y => -2
   node :x => -1, :y => -3
   node :x => 2,  :y => 1
   node :x => 3,  :y => 2
 end

Methods

new   node   ps  

Constants

DEFAULT_OPTIONS = { :x => :limit_left, :y => :current_row, :content => RGhost::ShapeContent::DEFAULT_OPTIONS, :border => RGhost::Border::DEFAULT_OPTIONS

Attributes

points  [R] 

Public Class methods

Public Instance methods

Creates new relative point by :x => 2 and :y => 4. Used as instance_eval

[Validate]