HaruPage::lineTo

(PECL haru >= 0.0.1)

HaruPage::lineToDraw 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을 던짐.

참고

add a note add a note

User Contributed Notes 1 note

up
0
aku at syuaa dot net
13 years ago
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();
?>
To Top