本文整理汇总了PHP中Amenadiel\JpGraph\Graph\Graph::LoadBkgImage方法的典型用法代码示例。如果您正苦于以下问题:PHP Graph::LoadBkgImage方法的具体用法?PHP Graph::LoadBkgImage怎么用?PHP Graph::LoadBkgImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Amenadiel\JpGraph\Graph\Graph
的用法示例。
在下文中一共展示了Graph::LoadBkgImage方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _strokeBackgroundImage
public function _strokeBackgroundImage()
{
if ($this->background_image == '') {
return;
}
$bkgimg = Graph::LoadBkgImage('', $this->background_image);
// Background width & Heoght
$bw = imagesx($bkgimg);
$bh = imagesy($bkgimg);
// Canvas width and height
$cw = imagesx($this->img);
$ch = imagesy($this->img);
if ($this->doshadow) {
$cw -= $this->shadow_width;
$ch -= $this->shadow_width;
}
if ($this->background_image_x === null || $this->background_image_y === null) {
if ($this->background_image_center) {
// Center original image in the plot area
$x = round($cw / 2 - $bw / 2);
$y = round($ch / 2 - $bh / 2);
} else {
// Just copy the image from left corner, no resizing
$x = 0;
$y = 0;
}
} else {
$x = $this->background_image_x;
$y = $this->background_image_y;
}
imagecopymerge($this->img, $bkgimg, $x, $y, 0, 0, $bw, $bh, $this->background_image_mix);
}