利用此样式定义形状的添补,如下例所示。
$shape->getFill()->setFillType(Fill::FILL_GRADIENT_LINEAR)->setRotation(270)->setStartColor(new Color('FFCCCCCC'))->setEndColor(new Color('FFFFFFFF'));
Properties(属性)
Border(边框)

利用以下样式定义形状的边框,如下例所示。
$shape->getBorder()->setLineStyle(Border::LINE_SINGLE)->setLineWidth(4)->getColor()->setARGB('FFC00000');
Properties(属性)
lineWidth 线宽lineStyle 线条样式dashStyle 虚线样式color 颜色Shadow(阴影)
利用此样式定义形状的阴影,如下例所示。
$shape->getShadow()->setVisible(true)->setDirection(45)->setDistance(10);
Properties(属性)
visible 可见性blurRadius 模糊半径distance 间隔direction 方向alignment 对齐color 颜色alpha 透明度Alignment(对齐)
horizontal 水平的vertical 垂直level 水平indent 缩进marginLeft 左外边距marginRight 右外边距Font(字体)
name 名称bold 粗体italic 斜体superScript 上标subScript 下标underline 下划线strikethrough 删除线color 颜色Bullet(项目符号)
bulletType项目符号类型bulletFont项目符号字体bulletChar项目符号颜色bulletNumericStyle数字项目符号样式bulletNumericStartAt数字项目符号起始编号Color
颜色可以运用于不同的工具,例如字体或边框。
$textRun = $shape->createTextRun('Text');$textRun->getFont()->setColor(new Color('C00000'));
本文为翻译内容:https://phppowerpoint.readthedocs.io/en/latest/styles.html