Method: RBPDF#SetX
- Defined in:
- lib/rbpdf.rb
#SetX(x, rtloff = false) ⇒ Object Also known as: set_x
Defines the abscissa of the current position. If the passed value is negative, it is relative to the right of the page (or left if language is RTL).
- @param float :x
-
The value of the abscissa.
- @param boolean :rtloff
-
if true always uses the page top-left corner as origin of axis.
- @access public
- @since 1.2
- @see
-
GetX(), GetY(), SetY(), SetXY()
5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 |
# File 'lib/rbpdf.rb', line 5480 def SetX(x, rtloff=false) #Set x position if !rtloff and @rtl if x >= 0 @x = @w - x else @x = x.abs end else if x >= 0 @x = x else @x = @w + x end end end |