HaruPage::lineTo
(PECL haru >= 0.0.1)
HaruPage::lineTo — Draw a line from the current point to the specified point
Описание
bool HaruPage::lineTo
( float
$x
, float $y
)Draws a line from the current point to the specified point.
Список параметров
-
x
-
-
y
-
Возвращаемые значения
Returns TRUE
on success.
Ошибки
Вызывает исключение HaruException при ошибке.
Смотрите также
- HaruPage::curveTo() - Append a Bezier curve to the current path
- HaruPage::curveTo2() - Append a Bezier curve to the current path
- HaruPage::curveTo3() - Append a Bezier curve to the current path
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Генерация нетекстовых MIME форматов
- Haru PDF
- Функция HaruPage::arc() - Append an arc to the current path
- Функция HaruPage::beginText() - Begin a text object and set the current text position to (0,0)
- Функция HaruPage::circle() - Append a circle to the current path
- Функция HaruPage::closePath() - Append a straight line from the current point to the start point of the path
- Функция HaruPage::concat() - Concatenate current transformation matrix of the page and the specified matrix
- Функция HaruPage::createDestination() - Create new HaruDestination instance
- Функция HaruPage::createLinkAnnotation() - Create new HaruAnnotation instance
- Функция HaruPage::createTextAnnotation() - Create new HaruAnnotation instance
- Функция HaruPage::createURLAnnotation() - Create and return new HaruAnnotation instance
- Функция HaruPage::curveTo2() - Append a Bezier curve to the current path
- Функция HaruPage::curveTo3() - Append a Bezier curve to the current path
- Функция HaruPage::curveTo() - Append a Bezier curve to the current path
- Функция HaruPage::drawImage() - Show image at the page
- Функция HaruPage::ellipse() - Append an ellipse to the current path
- Функция HaruPage::endPath() - End current path object without filling and painting operations
- Функция HaruPage::endText() - End current text object
- Функция HaruPage::eofill() - Fill current path using even-odd rule
- Функция HaruPage::eoFillStroke() - Fill current path using even-odd rule, then paint the path
- Функция HaruPage::fill() - Fill current path using nonzero winding number rule
- Функция HaruPage::fillStroke() - Fill current path using nonzero winding number rule, then paint the path
- Функция HaruPage::getCharSpace() - Get the current value of character spacing
- Функция HaruPage::getCMYKFill() - Get the current filling color
- Функция HaruPage::getCMYKStroke() - Get the current stroking color
- Функция HaruPage::getCurrentFont() - Get the currently used font
- Функция HaruPage::getCurrentFontSize() - Get the current font size
- Функция HaruPage::getCurrentPos() - Get the current position for path painting
- Функция HaruPage::getCurrentTextPos() - Get the current position for text printing
- Функция HaruPage::getDash() - Get the current dash pattern
- Функция HaruPage::getFillingColorSpace() - Get the current filling color space
- Функция HaruPage::getFlatness() - Get the flatness of the page
- Функция HaruPage::getGMode() - Get the current graphics mode
- Функция HaruPage::getGrayFill() - Get the current filling color
- Функция HaruPage::getGrayStroke() - Get the current stroking color
- Функция HaruPage::getHeight() - Get the height of the page
- Функция HaruPage::getHorizontalScaling() - Get the current value of horizontal scaling
- Функция HaruPage::getLineCap() - Get the current line cap style
- Функция HaruPage::getLineJoin() - Get the current line join style
- Функция HaruPage::getLineWidth() - Get the current line width
- Функция HaruPage::getMiterLimit() - Get the value of miter limit
- Функция HaruPage::getRGBFill() - Get the current filling color
- Функция HaruPage::getRGBStroke() - Get the current stroking color
- Функция HaruPage::getStrokingColorSpace() - Get the current stroking color space
- Функция HaruPage::getTextLeading() - Get the current value of line spacing
- Функция HaruPage::getTextMatrix() - Get the current text transformation matrix of the page
- Функция HaruPage::getTextRenderingMode() - Get the current text rendering mode
- Функция HaruPage::getTextRise() - Get the current value of text rising
- Функция HaruPage::getTextWidth() - Get the width of the text using current fontsize, character spacing and word spacing
- Функция HaruPage::getTransMatrix() - Get the current transformation matrix of the page
- Функция HaruPage::getWidth() - Get the width of the page
- Функция HaruPage::getWordSpace() - Get the current value of word spacing
- Функция HaruPage::lineTo() - Draw a line from the current point to the specified point
- Функция HaruPage::measureText() - Calculate the number of characters which can be included within the specified width
- Функция HaruPage::moveTextPos() - Move text position to the specified offset
- Функция HaruPage::moveTo() - Set starting point for new drawing path
- Функция HaruPage::moveToNextLine() - Move text position to the start of the next line
- Функция HaruPage::rectangle() - Append a rectangle to the current path
- Функция HaruPage::setCharSpace() - Set character spacing for the page
- Функция HaruPage::setCMYKFill() - Set filling color for the page
- Функция HaruPage::setCMYKStroke() - Set stroking color for the page
- Функция HaruPage::setDash() - Set the dash pattern for the page
- Функция HaruPage::setFlatness() - Set flatness for the page
- Функция HaruPage::setFontAndSize() - Set font and fontsize for the page
- Функция HaruPage::setGrayFill() - Set filling color for the page
- Функция HaruPage::setGrayStroke() - Sets stroking color for the page
- Функция HaruPage::setHeight() - Set height of the page
- Функция HaruPage::setHorizontalScaling() - Set horizontal scaling for the page
- Функция HaruPage::setLineCap() - Set the shape to be used at the ends of lines
- Функция HaruPage::setLineJoin() - Set line join style for the page
- Функция HaruPage::setLineWidth() - Set line width for the page
- Функция HaruPage::setMiterLimit() - Set the current value of the miter limit of the page
- Функция HaruPage::setRGBFill() - Set filling color for the page
- Функция HaruPage::setRGBStroke() - Set stroking color for the page
- Функция HaruPage::setRotate() - Set rotation angle of the page
- Функция HaruPage::setSize() - Set size and direction of the page
- Функция HaruPage::setSlideShow() - Set transition style for the page
- Функция HaruPage::setTextLeading() - Set text leading (line spacing) for the page
- Функция HaruPage::setTextMatrix() - Set the current text transformation matrix of the page
- Функция HaruPage::setTextRenderingMode() - Set text rendering mode for the page
- Функция HaruPage::setTextRise() - Set the current value of text rising
- Функция HaruPage::setWidth() - Set width of the page
- Функция HaruPage::setWordSpace() - Set word spacing for the page
- Функция HaruPage::showText() - Print text at the current position of the page
- Функция HaruPage::showTextNextLine() - Move the current position to the start of the next line and print the text
- Функция HaruPage::stroke() - Paint current path
- Функция HaruPage::textOut() - Print the text on the specified position
- Функция HaruPage::textRect() - Print the text inside the specified region
Коментарии
Here i show a simple example for this Line to.
<?php
$doc=new HaruDoc;
$page=$doc->addPage();
$page->setSize(HaruPage::SIZE_A4, HaruPage::PORTRAIT);
$page->setRGBStroke(0,0,0); // Set color to black
$page->setRGBFill(1,1,1); // Set fill to 100% for each rgb color
$page->moveTo(60, 100); // Move cursor to x 60, y 100
$page->lineTo(60,500); // Create line from x 60, y100 to x60, y500
$page->fillStroke();
//Output
header('Content-Type: application/pdf');
$doc->output();
?>