tFPDF::Line PHP Метод

Line() публичный Метод

public Line ( $x1, $y1, $x2, $y2 )
    function Line($x1, $y1, $x2, $y2)
    {
        // Draw a line
        $this->_out(sprintf('%.2F %.2F m %.2F %.2F l S', $x1 * $this->k, ($this->h - $y1) * $this->k, $x2 * $this->k, ($this->h - $y2) * $this->k));
    }

Usage Example

Пример #1
0
		require_once "../".DIR_FPDF;
	else
		require_once DIR_FPDF;
	
	$pdf = new tFPDF();
	$pdf->SetAutoPageBreak(true,10);
	$pdf->AddFont('DejaVu','','DejaVuSans.ttf',true);
	$pdf->AddFont('DejaVu','B','DejaVuSans-Bold.ttf',true);
	
	$pdf->AddPage();
	$pdf->SetFont('DejaVu','B',16);
	$pdf->Write(5,$_SESSION["c_name"]);
	$pdf->Ln();
	$pdf->SetFont('','',14);
	$pdf->Write(5,"Podiums");
	$pdf->Line(11,21,286.5,21);
	$pdf->Ln(10);
}

$events = strict_query("SELECT $eventstable.*, name, timetype FROM $eventstable JOIN categories ON categories.id=$eventstable.id ORDER BY $eventstable.id");
while ($rowEvt=cased_mysql_fetch_array($events))
{
	$round = 4;
	while ($round > 1 && !$rowEvt["r".$round."_open"]) $round--;
	$format = strict_query("SELECT name, avgtype FROM formats WHERE id=".$rowEvt["r".$round."_format"]);
	$avgname = cased_mysql_result($format,0,"name");
	$avgtype = cased_mysql_result($format,0,"avgtype");
	$cat_id = $rowEvt["id"];
	$timetype = $rowEvt["timetype"];
	//
	IF(!isset($CERTIFICATES))
All Usage Examples Of tFPDF::Line