Method: TCPDF#SetY
- Defined in:
- lib/tcpdf.rb
#SetY(y, resetx = true, rtloff = false) ⇒ Object Also known as: set_y
Moves the current abscissa back to the left margin and sets the ordinate. If the passed value is negative, it is relative to the bottom of the page.
- @param float :y
-
The value of the ordinate.
- @param bool :resetx
-
if true (default) reset the X position.
- @param boolean :rtloff
-
if true always uses the page top-left corner as origin of axis.
- @access public
- @since 1.0
- @see
-
GetX(), GetY(), SetY(), SetXY()
5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 |
# File 'lib/tcpdf.rb', line 5061 def SetY(y, resetx=true, rtloff=false) if resetx # reset x if !rtloff and @rtl @x = @w - @r_margin else @x = @l_margin end end if (y>=0) @y = y; else @y=@h+y; end if @y < 0 @y = 0 end if @y > @h @y = @h end end |