Shape extends AbstractStyle
Shape style
Tags
Table of Contents
- $aliases : array<string|int, mixed>
- Aliases
- $index : int|null
- Index number in Style collection for named style
- $styleName : string
- Style name
- $extrusion : Extrusion
- 3D extrusion
- $fill : Fill
- Fill
- $frame : Frame
- Frame
- $isAuto : bool
- Is this an automatic style? (Used primarily in OpenDocument driver)
- $outline : Outline
- Outline
- $points : string
- Points
- $roundness : int|float
- Roundness measure of corners; 0 = straightest (rectangular); 1 = roundest (circle/oval)
- $shadow : Shadow
- Shadow
- __construct() : mixed
- Create a new instance
- getChildStyleValue() : mixed
- Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`
- getExtrusion() : Extrusion
- Get 3D extrusion
- getFill() : Fill
- Get fill
- getFrame() : Frame
- Get frame
- getIndex() : int|null
- Get index number
- getOutline() : Outline
- Get outline
- getPoints() : string
- Get points
- getRoundness() : int|float
- Get roundness
- getShadow() : Shadow
- Get shadow
- getStyleName() : string
- Get style name
- isAuto() : bool
- Get is automatic style flag
- setArrayStyle() : self
- Set style using associative array
- setAuto() : self
- Set is automatic style flag
- setExtrusion() : self
- Set 3D extrusion
- setFill() : self
- Set fill
- setFrame() : self
- Set frame
- setIndex() : self
- Set index number
- setOutline() : self
- Set outline
- setPoints() : self
- Set points
- setRoundness() : self
- Set roundness
- setShadow() : self
- Set shadow
- setStyleByArray() : self
- Set style by using associative array
- setStyleName() : self
- Set style name
- setStyleValue() : self
- Set style value template method
- setBoolVal() : bool
- Set bool value
- setEnumVal() : mixed
- Set enum value
- setFloatVal() : float|null
- Set float value: Convert string that contains only numeric into float
- setIntVal() : int|null
- Set integer value: Convert string that contains only numeric into integer
- setNonEmptyVal() : string
- Set default for null and empty value
- setNumericVal() : int|float|null
- Set numeric value
- setObjectVal() : mixed
- Set object value
- setPairedVal() : self
- Set $property value and set $pairProperty = false when $value = true
Properties
$aliases
Aliases
protected
array<string|int, mixed>
$aliases
= array()
$index
Index number in Style collection for named style
protected
int|null
$index
This number starts from one and defined in Style::setStyleValues()
$styleName
Style name
protected
string
$styleName
$extrusion
3D extrusion
private
Extrusion
$extrusion
$fill
Fill
private
Fill
$fill
$frame
Frame
private
Frame
$frame
$isAuto
Is this an automatic style? (Used primarily in OpenDocument driver)
private
bool
$isAuto
= false
Tags
$outline
Outline
private
Outline
$outline
$points
Points
private
string
$points
- Arc: startAngle endAngle; 0 = top center, moving clockwise
- Curve: from-x1,from-y1 to-x2,to-y2 control1-x,control1-y control2-x,control2-y
- Line: from-x1,from-y1 to-x2,to-y2
- Polyline: x1,y1 x2,y2 ...
- Rect and oval: Not applicable
$roundness
Roundness measure of corners; 0 = straightest (rectangular); 1 = roundest (circle/oval)
private
int|float
$roundness
Only for rect
$shadow
Shadow
private
Shadow
$shadow
Methods
__construct()
Create a new instance
public
__construct([array<string|int, mixed> $style = array() ]) : mixed
Parameters
- $style : array<string|int, mixed> = array()
Return values
mixed —getChildStyleValue()
Return style value of child style object, e.g. `left` from `Indentation` child style of `Paragraph`
public
getChildStyleValue(AbstractStyle $substyleObject, string $substyleProperty) : mixed
Parameters
- $substyleObject : AbstractStyle
- $substyleProperty : string
Tags
Return values
mixed —getExtrusion()
Get 3D extrusion
public
getExtrusion() : Extrusion
Return values
Extrusion —getFill()
Get fill
public
getFill() : Fill
Return values
Fill —getFrame()
Get frame
public
getFrame() : Frame
Return values
Frame —getIndex()
Get index number
public
getIndex() : int|null
Return values
int|null —getOutline()
Get outline
public
getOutline() : Outline
Return values
Outline —getPoints()
Get points
public
getPoints() : string
Return values
string —getRoundness()
Get roundness
public
getRoundness() : int|float
Return values
int|float —getShadow()
Get shadow
public
getShadow() : Shadow
Return values
Shadow —getStyleName()
Get style name
public
getStyleName() : string
Return values
string —isAuto()
Get is automatic style flag
public
isAuto() : bool
Return values
bool —setArrayStyle()
Set style using associative array
public
setArrayStyle([array<string|int, mixed> $style = array() ]) : self
Parameters
- $style : array<string|int, mixed> = array()
Tags
Return values
self —setAuto()
Set is automatic style flag
public
setAuto([bool $value = true ]) : self
Parameters
- $value : bool = true
Return values
self —setExtrusion()
Set 3D extrusion
public
setExtrusion([mixed $value = null ]) : self
Parameters
- $value : mixed = null
Return values
self —setFill()
Set fill
public
setFill([mixed $value = null ]) : self
Parameters
- $value : mixed = null
Return values
self —setFrame()
Set frame
public
setFrame([mixed $value = null ]) : self
Parameters
- $value : mixed = null
Return values
self —setIndex()
Set index number
public
setIndex([int|null $value = null ]) : self
Parameters
- $value : int|null = null
Return values
self —setOutline()
Set outline
public
setOutline([mixed $value = null ]) : self
Parameters
- $value : mixed = null
Return values
self —setPoints()
Set points
public
setPoints([string $value = null ]) : self
Parameters
- $value : string = null
Return values
self —setRoundness()
Set roundness
public
setRoundness([int|float $value = null ]) : self
Parameters
- $value : int|float = null
Return values
self —setShadow()
Set shadow
public
setShadow([mixed $value = null ]) : self
Parameters
- $value : mixed = null
Return values
self —setStyleByArray()
Set style by using associative array
public
setStyleByArray([array<string|int, mixed> $values = array() ]) : self
Parameters
- $values : array<string|int, mixed> = array()
Return values
self —setStyleName()
Set style name
public
setStyleName(string $value) : self
Parameters
- $value : string
Return values
self —setStyleValue()
Set style value template method
public
setStyleValue(string $key, string $value) : self
Some child classes have their own specific overrides. Backward compability check for versions < 0.10.0 which use underscore prefix for their private properties. Check if the set method is exists. Throws an exception?
Parameters
- $key : string
- $value : string
Return values
self —setBoolVal()
Set bool value
protected
setBoolVal(bool $value, bool $default) : bool
Parameters
- $value : bool
- $default : bool
Return values
bool —setEnumVal()
Set enum value
protected
setEnumVal([mixed $value = null ][, array<string|int, mixed> $enum = array() ][, mixed $default = null ]) : mixed
Parameters
- $value : mixed = null
- $enum : array<string|int, mixed> = array()
- $default : mixed = null
Tags
Return values
mixed —setFloatVal()
Set float value: Convert string that contains only numeric into float
protected
setFloatVal(mixed $value[, float|null $default = null ]) : float|null
Parameters
- $value : mixed
- $default : float|null = null
Return values
float|null —setIntVal()
Set integer value: Convert string that contains only numeric into integer
protected
setIntVal(int|null $value[, int|null $default = null ]) : int|null
Parameters
- $value : int|null
- $default : int|null = null
Return values
int|null —setNonEmptyVal()
Set default for null and empty value
protected
setNonEmptyVal(string $value, string $default) : string
Parameters
- $value : string
-
(was: mixed)
- $default : string
-
(was: mixed)
Return values
string —(was: mixed)
setNumericVal()
Set numeric value
protected
setNumericVal(mixed $value[, int|float|null $default = null ]) : int|float|null
Parameters
- $value : mixed
- $default : int|float|null = null
Return values
int|float|null —setObjectVal()
Set object value
protected
setObjectVal(mixed $value, string $styleName, mixed &$style) : mixed
Parameters
- $value : mixed
- $styleName : string
- $style : mixed
Return values
mixed —setPairedVal()
Set $property value and set $pairProperty = false when $value = true
protected
setPairedVal(bool &$property, bool &$pairProperty, bool $value) : self
Parameters
- $property : bool
- $pairProperty : bool
- $value : bool