本文整理匯總了PHP中Intervention\Image\Image::polygon方法的典型用法代碼示例。如果您正苦於以下問題:PHP Image::polygon方法的具體用法?PHP Image::polygon怎麽用?PHP Image::polygon使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Intervention\Image\Image
的用法示例。
在下文中一共展示了Image::polygon方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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);
});
}