Horde_Pdf_Writer::_doUnderline PHP Method

_doUnderline() protected method

Underline a block of text.
protected _doUnderline ( integer $x, integer $y, string $text ) : string
$x integer X-coordinate
$y integer Y-coordinate
$text string Text to underline
return string Underlined string
    protected function _doUnderline($x, $y, $text)
    {
        // Set the rectangle width according to text width.
        $width = $this->getStringWidth($text, true);
        /* Set rectangle position and height, using underline position and
         * thickness settings scaled by the font size. */
        $y = $y + $this->_current_font['up'] * $this->_font_size_pt / 1000;
        $height = -$this->_current_font['ut'] * $this->_font_size_pt / 1000;
        return sprintf('%.2F %.2F %.2F %.2F re f', $x, $y, $width, $height);
    }