vendor/grafika/src/Grafika/DrawingObject/Polygon.php
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
namespace Grafika\DrawingObject;
use Grafika\Color;
/**
* Base class
* @package Grafika
*/
abstract class Polygon
{
/**
* Image width in pixels
* @var int
*/
protected $width;
/**
* Image height in pixels
* @var int
*/
protected $height;
/**
* Array of all X and Y positions. Must have at least three positions (x,y).
* @var array
*/
protected $points;
/**
* @var int
*/
protected $borderSize;
/**
* @var Color
*/
protected $fillColor;
/**
* @var Color
*/
protected $borderColor;
/**
* Creates a polygon.
*
* @param array $points Array of all X and Y positions. Must have at least three positions.
* @param int $borderSize Size of the border in pixels. Defaults to 1 pixel. Set to 0 for no border.
* @param Color|string|bool $borderColor Border color. Defaults to black. Set to null for no color.
* @param Color|string|bool $fillColor Fill color. Defaults to white. Set to null for no color.
*/
public function __construct($points = array(array(0,0), array(0,0), array(0,0)), $borderSize = 1, $borderColor = '#000000', $fillColor = '#FFFFFF') {
if (is_string($borderColor)) {
$borderColor = new Color($borderColor);
}
if (is_string($fillColor)) {
$fillColor = new Color($fillColor);
}
后面还有 56 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
