function SetY($y) { // Set y position and reset x $this->x = $this->lMargin; if ($y >= 0) { $this->y = $y; } else { $this->y = $this->h + $y; } }