Class: Diagrams::Point

Inherits:
Sized show all
Defined in:
lib/maruku/ext/diagrams/structures.rb

Instance Attribute Summary collapse

Attributes inherited from Sized

#hs, #links, #vs

Instance Method Summary collapse

Constructor Details

#initializePoint

Returns a new instance of Point.



122
123
124
125
# File 'lib/maruku/ext/diagrams/structures.rb', line 122

def initialize
	super()
	@aligned = {:l=>[],:t=>[]}
end

Instance Attribute Details

#alignedObject

Returns the value of attribute aligned.



117
118
119
# File 'lib/maruku/ext/diagrams/structures.rb', line 117

def aligned
  @aligned
end

#charObject

Returns the value of attribute char.



115
116
117
# File 'lib/maruku/ext/diagrams/structures.rb', line 115

def char
  @char
end

#posObject

Returns the value of attribute pos.



114
115
116
# File 'lib/maruku/ext/diagrams/structures.rb', line 114

def pos
  @pos
end

#v_pObject

variables for point position



120
121
122
# File 'lib/maruku/ext/diagrams/structures.rb', line 120

def v_p
  @v_p
end

Instance Method Details



127
128
129
130
131
132
133
# File 'lib/maruku/ext/diagrams/structures.rb', line 127

def link_direction(pos, inc)
	if inc.x > 0 then return :W end
	if inc.x < 0 then return :E end
	if inc.y > 0 then return :N end
	if inc.y < 0 then return :S end
	raise "Strange #{inc.inspect}: "+self.inspect
end