本文整理汇总了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);
});
}