当前位置: 首页>>代码示例>>PHP>>正文


PHP unknown_type::drawText方法代码示例

本文整理汇总了PHP中unknown_type::drawText方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown_type::drawText方法的具体用法?PHP unknown_type::drawText怎么用?PHP unknown_type::drawText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在unknown_type的用法示例。


在下文中一共展示了unknown_type::drawText方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: drawTableHeader

 /**
  * Dessine l'entete du tableau avec la liste des produits
  *
  * @param unknown_type $page
  */
 public function drawTableHeader(&$page)
 {
     //entetes de colonnes
     $this->y -= 15;
     $page->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 12);
     $page->drawText(mage::helper('purchase')->__('Qty'), 15, $this->y, 'UTF-8');
     $page->drawText(mage::helper('purchase')->__('Manufacturer'), 70, $this->y, 'UTF-8');
     $page->drawText(mage::helper('purchase')->__('Sku'), 180, $this->y, 'UTF-8');
     $page->drawText(mage::helper('purchase')->__('Product'), 310, $this->y, 'UTF-8');
     //barre grise fin entete colonnes
     $this->y -= 8;
     $page->drawLine(10, $this->y, $this->_BLOC_ENTETE_LARGEUR, $this->y);
     $this->y -= 15;
 }
开发者ID:TrygveSkogsholm,项目名称:Magento-Patch,代码行数:19,代码来源:SelectedOrdersProductsSummaryPdf.php

示例2: drawTextInBlock

 /**
  * Dessine du texte dans un bloc en permettant l'alignement horizontal
  *
  * @param unknown_type $page
  * @param unknown_type $text
  * @param unknown_type $x
  * @param unknown_type $y
  * @param unknown_type $width
  * @param unknown_type $height
  * @param unknown_type $alignment
  */
 public function drawTextInBlock(&$page, $text, $x, $y, $width, $height, $alignment = 'c', $encoding = 'UTF-8')
 {
     //$page->drawRectangle($x, $y, $x + $width, $y + $height, Zend_Pdf_Page::LINE_DASHING_SOLID);
     //recupere la largeur du texte
     $text_width = $this->widthForStringUsingFontSize($text, $page->getFont(), $page->getFontSize());
     switch ($alignment) {
         case 'c':
             //on centre le texte dans le bloc
             $x = $x + $width / 2 - $text_width / 2;
             break;
         case 'r':
             //on aligne à droite
             $x = $x + $width - $text_width;
     }
     $page->drawText(trim(strip_tags($text)), $x, $y, $encoding);
 }
开发者ID:TrygveSkogsholm,项目名称:Magento-Patch,代码行数:27,代码来源:Pdfhelper.php

示例3: drawTableHeader

 /**
  * Dessine l'entete du tableau avec la liste des produits
  *
  * @param unknown_type $page
  */
 public function drawTableHeader(&$page)
 {
     //entetes de colonnes
     $this->y -= 15;
     $page->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 10);
     $page->drawText(mage::helper('purchase')->__('SKU'), 15, $this->y, 'UTF-8');
     $page->drawText(mage::helper('purchase')->__('Model #'), 80, $this->y, 'UTF-8');
     $page->drawText(mage::helper('purchase')->__('Description'), 160, $this->y, 'UTF-8');
     $page->drawText(mage::helper('purchase')->__('HTS code'), 300, $this->y, 'UTF-8');
     $page->drawText(mage::helper('purchase')->__('Unit Price'), 440, $this->y, 'UTF-8');
     $page->drawText(mage::helper('purchase')->__('Qty'), 390, $this->y, 'UTF-8');
     //$page->drawText(mage::helper('purchase')->__('WEEE'), 365, $this->y, 'UTF-8');
     //$page->drawText(mage::helper('purchase')->__('Tax'), 410, $this->y, 'UTF-8');
     $page->drawText(mage::helper('purchase')->__('Total HT'), 510, $this->y, 'UTF-8');
     //$page->drawText(mage::helper('purchase')->__('Total + Duty'), 530, $this->y, 'UTF-8');
     //barre grise fin entete colonnes
     $this->y -= 8;
     $page->drawLine(10, $this->y, $this->_BLOC_ENTETE_LARGEUR, $this->y);
     $this->y -= 15;
 }
开发者ID:TrygveSkogsholm,项目名称:Magento-Patch,代码行数:25,代码来源:Order.php


注:本文中的unknown_type::drawText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。