downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

HaruPage::measureText> <HaruPage::getWordSpace
[edit] Last updated: Fri, 25 May 2012

view this page in

HaruPage::lineTo

(PECL haru >= 0.0.1)

HaruPage::lineTo現在位置から指定した位置まで直線を描画する

説明

bool HaruPage::lineTo ( float $x , float $y )

現在位置から指定した位置まで直線を描画します。

パラメータ

x

y

返り値

成功した場合に TRUE を返します。

エラー / 例外

エラー時に HaruException をスローします。

参考



add a note add a note User Contributed Notes HaruPage::lineTo
aku at syuaa dot net 08-Jun-2011 11:38
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();
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites