本文整理汇总了PHP中Cpdf::line方法的典型用法代码示例。如果您正苦于以下问题:PHP Cpdf::line方法的具体用法?PHP Cpdf::line怎么用?PHP Cpdf::line使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cpdf
的用法示例。
在下文中一共展示了Cpdf::line方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: line
function line($x1, $y1, $x2, $y2, $color, $width, $style = array())
{
//pre_r(compact("x1", "y1", "x2", "y2", "color", "width", "style"));
$this->_set_stroke_color($color);
$this->_set_line_style($width, "butt", "", $style);
$this->_pdf->line($x1, $this->y($y1), $x2, $this->y($y2));
}
示例2: line
function line($x1, $y1, $x2, $y2, $color, $width, $style = array(), $blend = "Normal", $opacity = 1.0)
{
//pre_r(compact("x1", "y1", "x2", "y2", "color", "width", "style"));
$this->_set_stroke_color($color);
$this->_set_line_style($width, "butt", "", $style);
$this->_set_line_transparency($blend, $opacity);
$this->_pdf->line($x1, $this->y($y1), $x2, $this->y($y2));
}
示例3:
while ($InventoryValn = DB_fetch_array($InventoryResult, $db)) {
if ($Category != $InventoryValn['categoryid']) {
$FontSize = 10;
if ($Category != '') {
/*Then it's NOT the first time round */
/* need to print the total of previous category */
if ($_POST['DetailedReport'] == 'Yes') {
$YPos -= 2 * $line_height;
$LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos, 260 - $Left_Margin, $FontSize, _('Total for') . ' ' . $Category . ' - ' . $CategoryName);
}
$DisplayCatTotVal = locale_money_format($CatTot_Val, $_SESSION['CompanyRecord']['currencydefault']);
$LeftOvers = $pdf->addTextWrap(500, $YPos, 60, $FontSize, $DisplayCatTotVal, 'right');
$YPos -= $line_height;
if ($_POST['DetailedReport'] == 'Yes') {
/*draw a line under the CATEGORY TOTAL*/
$pdf->line($Left_Margin, $YPos + $line_height - 2, $Page_Width - $Right_Margin, $YPos + $line_height - 2);
$YPos -= 2 * $line_height;
}
$CatTot_Val = 0;
}
$LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos, 260 - $Left_Margin, $FontSize, $InventoryValn['categoryid'] . " - " . $InventoryValn['categorydescription']);
$Category = $InventoryValn['categoryid'];
$CategoryName = $InventoryValn['categorydescription'];
}
if ($_POST['DetailedReport'] == 'Yes') {
$YPos -= $line_height;
$FontSize = 8;
$LeftOvers = $pdf->addTextWrap($Left_Margin, $YPos, 60, $FontSize, $InventoryValn['stockid']);
$LeftOvers = $pdf->addTextWrap(120, $YPos, 260, $FontSize, $InventoryValn['description']);
$DisplayUnitCost = locale_money_format($InventoryValn['unitcost'], $_SESSION['CompanyRecord']['currencydefault']);
$DisplayQtyOnHand = locale_number_format($InventoryValn['qtyonhand'], $InventoryValn['decimalplaces']);
示例4: PrintLinesToBottom
}
//end if need a new page headed up
}
/*end while there are line items to print out*/
}
/*end if there are stock movements to show on the invoice or credit note*/
$YPos -= $line_height;
/* check to see enough space left to print the 4 lines for the totals/footer */
if ($YPos - $Bottom_Margin < 2 * $line_height) {
PrintLinesToBottom();
include 'includes/PDFTransPageHeaderPortrait.inc';
}
/*Print a column vertical line with enough space for the footer*/
/*draw the vertical column lines to 4 lines shy of the bottom
to leave space for invoice footer info ie totals etc*/
$pdf->line($Left_Margin + 78, $TopOfColHeadings + 12, $Left_Margin + 78, $Bottom_Margin + 4 * $line_height);
/*Print a column vertical line */
$pdf->line($Left_Margin + 268, $TopOfColHeadings + 12, $Left_Margin + 268, $Bottom_Margin + 4 * $line_height);
/*Print a column vertical line */
$pdf->line($Left_Margin + 348, $TopOfColHeadings + 12, $Left_Margin + 348, $Bottom_Margin + 4 * $line_height);
/*Print a column vertical line */
$pdf->line($Left_Margin + 388, $TopOfColHeadings + 12, $Left_Margin + 388, $Bottom_Margin + 4 * $line_height);
/*Print a column vertical line */
$pdf->line($Left_Margin + 418, $TopOfColHeadings + 12, $Left_Margin + 418, $Bottom_Margin + 4 * $line_height);
$pdf->line($Left_Margin + 448, $TopOfColHeadings + 12, $Left_Margin + 448, $Bottom_Margin + 4 * $line_height);
/*Rule off at bottom of the vertical lines */
$pdf->line($Left_Margin, $Bottom_Margin + 4 * $line_height, $Page_Width - $Right_Margin, $Bottom_Margin + 4 * $line_height);
/*Now print out the footer and totals */
if ($InvOrCredit == 'Invoice') {
$DisplaySubTot = locale_number_format($myrow['ovamount'], $myrow['decimalplaces']);
$DisplayFreight = locale_number_format($myrow['ovfreight'], $myrow['decimalplaces']);
示例5: while
//+----------------------------------------------------------------------+
// Set the width of the section
$note_section_width = 320 - $left_margin;
// Set the height of the section
$note_section_height = $page_length - $bottom_margin;
// Loop through and draw each line
$c = $bottom_margin;
if (isset($_GET['show_notes_lines']) && $_GET['show_notes_lines'] == "on") {
while ($c < $note_section_height - 10) {
// Set the line style
if (isset($_GET['use_light_lines'])) {
$pdf->setLineStyle(0.5);
} else {
$pdf->setLineStyle(1);
}
$pdf->line($left_margin, $c, $note_section_width, $c);
$c = $c + $line_height;
}
}
// Set the line color/style
$pdf->setStrokeColor(0, 0, 0);
if (isset($_GET['use_light_lines'])) {
$pdf->setLineStyle(0.5);
} else {
$pdf->setLineStyle(1);
}
// Draw the title
$note_title_left_margin = round($note_section_width / 2, 2);
$pdf->addText($note_title_left_margin, $note_section_height, 10, "Notes", 0, 0);
//+----------------------------------------------------------------------+
//| DRAW THE PAGE BOX
示例6: PrintLinesToBottom
include 'includes/PDFTransPageHeader.inc';
}
//end if need a new page headed up
}
//end while there invoice are line items to print out
}
/*end if there are stock movements to show on the invoice or credit note*/
$YPos -= $line_height;
/* check to see enough space left to print the 4 lines for the totals/footer */
if ($YPos - $Bottom_Margin < 2 * $line_height) {
PrintLinesToBottom();
include 'includes/PDFTransPageHeader.inc';
}
/* Print a column vertical line with enough space for the footer */
/* draw the vertical column lines to 4 lines shy of the bottom to leave space for invoice footer info ie totals etc */
$pdf->line($Left_Margin + 97, $TopOfColHeadings + 12, $Left_Margin + 97, $Bottom_Margin + 4 * $line_height);
/* Print a column vertical line */
$pdf->line($Left_Margin + 350, $TopOfColHeadings + 12, $Left_Margin + 350, $Bottom_Margin + 4 * $line_height);
/* Print a column vertical line */
$pdf->line($Left_Margin + 450, $TopOfColHeadings + 12, $Left_Margin + 450, $Bottom_Margin + 4 * $line_height);
/* Print a column vertical line */
$pdf->line($Left_Margin + 550, $TopOfColHeadings + 12, $Left_Margin + 550, $Bottom_Margin + 4 * $line_height);
/* Print a column vertical line */
$pdf->line($Left_Margin + 587, $TopOfColHeadings + 12, $Left_Margin + 587, $Bottom_Margin + 4 * $line_height);
$pdf->line($Left_Margin + 640, $TopOfColHeadings + 12, $Left_Margin + 640, $Bottom_Margin + 4 * $line_height);
/* Rule off at bottom of the vertical lines */
$pdf->line($Left_Margin, $Bottom_Margin + 4 * $line_height, $Page_Width - $Right_Margin, $Bottom_Margin + 4 * $line_height);
/* Now print out the footer and totals */
if ($InvOrCredit == 'Invoice') {
$DisplaySubTot = locale_number_format($myrow['ovamount'], $myrow['decimalplaces']);
$DisplayFreight = locale_number_format($myrow['ovfreight'], $myrow['decimalplaces']);