示例#1
0
 /**
  * Add border.
  *
  * @param Phprojekt_Pdf_Page $page     Current page.
  * @param integer            $x        Start position x.
  * @param integer            $y        Start position y.
  * @param integer            $height   Current height.
  * @param boolean            $isHeader True if is a header.
  *
  * @return void
  */
 public function renderBorder($page, $x, $y, $height, $isHeader = false)
 {
     if ($isHeader) {
         $grayColor = new Zend_Pdf_Color_GrayScale(Phprojekt_Pdf_Page::HEADER_GRAY_LEVEL);
         $blackColor = new Zend_Pdf_Color_GrayScale(0);
         $page->setFillColor($grayColor);
         $page->drawRectangle($x, $y, $x + $this->_width, $y - $height, Zend_Pdf_Page::SHAPE_DRAW_FILL);
         $page->setFillColor($blackColor);
     }
     $page->drawRectangle($x, $y, $x + $this->_width, $y - $height, Zend_Pdf_Page::SHAPE_DRAW_STROKE);
 }