class Etti::PrintView
Attributes
centerX[R]
centerY[R]
scale[R]
Public Class Methods
new()
click to toggle source
# File lib/etti/print-view.rb, line 5 def initialize @scale = 2.8346457 @centerX = 0.0 @centerY = 0.0 @width = 210.0 @height = 297.0 end
Public Instance Methods
pos_to_view(x=0.0, y=0.0)
click to toggle source
# File lib/etti/print-view.rb, line 15 def pos_to_view x=0.0, y=0.0 x1 = (x + @centerX) * @scale # + @width / 2.0 y1 = (y + @centerY) * @scale # + @height / 2.0 [x1, y1] end