當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Image::rectangle方法代碼示例

本文整理匯總了PHP中Intervention\Image\Image::rectangle方法的典型用法代碼示例。如果您正苦於以下問題:PHP Image::rectangle方法的具體用法?PHP Image::rectangle怎麽用?PHP Image::rectangle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Intervention\Image\Image的用法示例。


在下文中一共展示了Image::rectangle方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: rectangle

 /**
  * Draw rectangle in current image starting at point 1 and ending at point 2
  *
  * @param string $color
  * @param integer $x1
  * @param integer $y1
  * @param integer $x2
  * @param integer $y2
  * @param boolean $filled
  * @return \Intervention\Image\Image 
  * @static 
  */
 public static function rectangle($color, $x1 = 0, $y1 = 0, $x2 = 10, $y2 = 10, $filled = true)
 {
     return \Intervention\Image\Image::rectangle($color, $x1, $y1, $x2, $y2, $filled);
 }
開發者ID:jorzhikgit,項目名稱:MLM-Nexus,代碼行數:16,代碼來源:_ide_helper.php

示例2: runOverlay

 public function runOverlay(Image $image, $width, $color)
 {
     return $image->rectangle($width / 2, $width / 2, $image->width() - $width / 2, $image->height() - $width / 2, function ($draw) use($width, $color) {
         $draw->border($width, $color);
     });
 }
開發者ID:placers,項目名稱:imgproxy,代碼行數:6,代碼來源:Border.php

示例3: drawRect

 private function drawRect(Image $img, $xstart, $ystart, $rectwidth, $rectheight)
 {
     $img->rectangle($xstart, $ystart, $xstart + $rectwidth, $ystart + $rectheight, function ($draw) {
         $draw->background('rgba(' . rand(0, 255) . ',' . rand(0, 255) . ',' . rand(0, 255) . ',1.0)');
     });
 }
開發者ID:zamronypj,項目名稱:placeimg,代碼行數:6,代碼來源:RandomMozaicGenerator.php

示例4: itemsHeader

 protected function itemsHeader()
 {
     $this->image->rectangle(0, 1150, $this->image->getWidth(), 1265, function (AbstractShape $shape) {
         $shape->background($this->template->getColorEven());
     });
     $this->image->polygon([$this->image->getWidth(), 1150, $this->image->getWidth(), 1265, 2000, 1265, 2150, 1150], function (AbstractShape $shape) {
         $shape->background($this->template->getPrimaryColor());
     });
     $this->image->rectangle(0, 1265, $this->image->getWidth(), 1270, function (AbstractShape $shape) {
         $shape->background($this->template->getPrimaryColor());
     });
     $this->image->text(Strings::upper($this->translate('item')), 165, 1205, function (Font $font) {
         $font->color($this->template->getPrimaryColor());
         $font->file($this->template->getFontBold());
         $font->valign('center');
         $font->align('center');
         $font->size(37);
     });
     $this->image->text(Strings::upper($this->translate('count')), 1250, 1205, function (Font $font) {
         $font->color($this->template->getPrimaryColor());
         $font->file($this->template->getFontBold());
         $font->valign('center');
         $font->align('center');
         $font->size(37);
     });
     $this->image->text(Strings::upper($this->translate('pricePerItem')), 1650, 1205, function (Font $font) {
         $font->color($this->template->getPrimaryColor());
         $font->file($this->template->getFontBold());
         $font->valign('center');
         $font->align('center');
         $font->size(37);
     });
     $this->image->text(Strings::upper($this->translate('total')), 2250, 1205, function (Font $font) {
         $font->color($this->template->getColorOdd());
         $font->file($this->template->getFontBold());
         $font->valign('center');
         $font->align('center');
         $font->size(37);
     });
 }
開發者ID:webchemistry,項目名稱:invoice,代碼行數:40,代碼來源:Invoice.php


注:本文中的Intervention\Image\Image::rectangle方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。