Style
in package
Table of Contents
- TYPE_ANGLE = 4
- TYPE_COLOR = 1
- TYPE_LENGTH = 2
- TYPE_NAME = 3
- TYPE_NUMBER = 5
- $color : mixed
- $colorNames : mixed
- $display : mixed
- $fill : mixed
- $fillOpacity : mixed
- $fillRule : mixed
- $fontFamily : mixed
- $fontSize : mixed
- $fontStyle : mixed
- $fontWeight : mixed
- $opacity : mixed
- $stroke : mixed
- $strokeDasharray : mixed
- $strokeDashoffset : mixed
- $strokeLinecap : mixed
- $strokeLinejoin : mixed
- $strokeMiterlimit : mixed
- $strokeOpacity : mixed
- $strokeWidth : mixed
- $textAnchor : mixed
- convertSize() : float|null
- Convert a size to a float
- fromAttributes() : Style
- fromStyleSheets() : mixed
- getTriplet() : mixed
- inherit() : mixed
- parseColor() : mixed
- parseCssStyle() : array<string|int, mixed>
- Simple CSS parser
- parseHexColor() : mixed
- fillStyles() : mixed
- getStyleMap() : mixed
Constants
TYPE_ANGLE
public
mixed
TYPE_ANGLE
= 4
TYPE_COLOR
public
mixed
TYPE_COLOR
= 1
TYPE_LENGTH
public
mixed
TYPE_LENGTH
= 2
TYPE_NAME
public
mixed
TYPE_NAME
= 3
TYPE_NUMBER
public
mixed
TYPE_NUMBER
= 5
Properties
$color
public
mixed
$color
$colorNames
public
static mixed
$colorNames
= array('antiquewhite' => '#FAEBD7', 'aqua' => '#00FFFF', 'aquamarine' => '#7FFFD4', 'beige' => '#F5F5DC', 'black' => '#000000', 'blue' => '#0000FF', 'brown' => '#A52A2A', 'cadetblue' => '#5F9EA0', 'chocolate' => '#D2691E', 'cornflowerblue' => '#6495ED', 'crimson' => '#DC143C', 'darkblue' => '#00008B', 'darkgoldenrod' => '#B8860B', 'darkgreen' => '#006400', 'darkmagenta' => '#8B008B', 'darkorange' => '#FF8C00', 'darkred' => '#8B0000', 'darkseagreen' => '#8FBC8F', 'darkslategray' => '#2F4F4F', 'darkviolet' => '#9400D3', 'deepskyblue' => '#00BFFF', 'dodgerblue' => '#1E90FF', 'firebrick' => '#B22222', 'forestgreen' => '#228B22', 'fuchsia' => '#FF00FF', 'gainsboro' => '#DCDCDC', 'gold' => '#FFD700', 'gray' => '#808080', 'green' => '#008000', 'greenyellow' => '#ADFF2F', 'hotpink' => '#FF69B4', 'indigo' => '#4B0082', 'khaki' => '#F0E68C', 'lavenderblush' => '#FFF0F5', 'lemonchiffon' => '#FFFACD', 'lightcoral' => '#F08080', 'lightgoldenrodyellow' => '#FAFAD2', 'lightgreen' => '#90EE90', 'lightsalmon' => '#FFA07A', 'lightskyblue' => '#87CEFA', 'lightslategray' => '#778899', 'lightyellow' => '#FFFFE0', 'lime' => '#00FF00', 'limegreen' => '#32CD32', 'magenta' => '#FF00FF', 'maroon' => '#800000', 'mediumaquamarine' => '#66CDAA', 'mediumorchid' => '#BA55D3', 'mediumseagreen' => '#3CB371', 'mediumspringgreen' => '#00FA9A', 'mediumvioletred' => '#C71585', 'midnightblue' => '#191970', 'mintcream' => '#F5FFFA', 'moccasin' => '#FFE4B5', 'navy' => '#000080', 'olive' => '#808000', 'orange' => '#FFA500', 'orchid' => '#DA70D6', 'palegreen' => '#98FB98', 'palevioletred' => '#D87093', 'peachpuff' => '#FFDAB9', 'pink' => '#FFC0CB', 'powderblue' => '#B0E0E6', 'purple' => '#800080', 'red' => '#FF0000', 'royalblue' => '#4169E1', 'salmon' => '#FA8072', 'seagreen' => '#2E8B57', 'sienna' => '#A0522D', 'silver' => '#C0C0C0', 'skyblue' => '#87CEEB', 'slategray' => '#708090', 'springgreen' => '#00FF7F', 'steelblue' => '#4682B4', 'tan' => '#D2B48C', 'teal' => '#008080', 'thistle' => '#D8BFD8', 'turquoise' => '#40E0D0', 'violetred' => '#D02090', 'white' => '#FFFFFF', 'yellow' => '#FFFF00', 'aliceblue' => '#f0f8ff', 'azure' => '#f0ffff', 'bisque' => '#ffe4c4', 'blanchedalmond' => '#ffebcd', 'blueviolet' => '#8a2be2', 'burlywood' => '#deb887', 'chartreuse' => '#7fff00', 'coral' => '#ff7f50', 'cornsilk' => '#fff8dc', 'cyan' => '#00ffff', 'darkcyan' => '#008b8b', 'darkgray' => '#a9a9a9', 'darkgrey' => '#a9a9a9', 'darkkhaki' => '#bdb76b', 'darkolivegreen' => '#556b2f', 'darkorchid' => '#9932cc', 'darksalmon' => '#e9967a', 'darkslateblue' => '#483d8b', 'darkslategrey' => '#2f4f4f', 'darkturquoise' => '#00ced1', 'deeppink' => '#ff1493', 'dimgray' => '#696969', 'dimgrey' => '#696969', 'floralwhite' => '#fffaf0', 'ghostwhite' => '#f8f8ff', 'goldenrod' => '#daa520', 'grey' => '#808080', 'honeydew' => '#f0fff0', 'indianred' => '#cd5c5c', 'ivory' => '#fffff0', 'lavender' => '#e6e6fa', 'lawngreen' => '#7cfc00', 'lightblue' => '#add8e6', 'lightcyan' => '#e0ffff', 'lightgray' => '#d3d3d3', 'lightgrey' => '#d3d3d3', 'lightpink' => '#ffb6c1', 'lightseagreen' => '#20b2aa', 'lightslategrey' => '#778899', 'lightsteelblue' => '#b0c4de', 'linen' => '#faf0e6', 'mediumblue' => '#0000cd', 'mediumpurple' => '#9370db', 'mediumslateblue' => '#7b68ee', 'mediumturquoise' => '#48d1cc', 'mistyrose' => '#ffe4e1', 'navajowhite' => '#ffdead', 'oldlace' => '#fdf5e6', 'olivedrab' => '#6b8e23', 'orangered' => '#ff4500', 'palegoldenrod' => '#eee8aa', 'paleturquoise' => '#afeeee', 'papayawhip' => '#ffefd5', 'peru' => '#cd853f', 'plum' => '#dda0dd', 'rosybrown' => '#bc8f8f', 'saddlebrown' => '#8b4513', 'sandybrown' => '#f4a460', 'seashell' => '#fff5ee', 'slateblue' => '#6a5acd', 'slategrey' => '#708090', 'snow' => '#fffafa', 'tomato' => '#ff6347', 'violet' => '#ee82ee', 'wheat' => '#f5deb3', 'whitesmoke' => '#f5f5f5', 'yellowgreen' => '#9acd32')
$display
public
mixed
$display
$fill
public
mixed
$fill
$fillOpacity
public
mixed
$fillOpacity
$fillRule
public
mixed
$fillRule
$fontFamily
public
mixed
$fontFamily
= 'serif'
$fontSize
public
mixed
$fontSize
= 12
$fontStyle
public
mixed
$fontStyle
= 'normal'
$fontWeight
public
mixed
$fontWeight
= 'normal'
$opacity
public
mixed
$opacity
$stroke
public
mixed
$stroke
$strokeDasharray
public
mixed
$strokeDasharray
$strokeDashoffset
public
mixed
$strokeDashoffset
$strokeLinecap
public
mixed
$strokeLinecap
$strokeLinejoin
public
mixed
$strokeLinejoin
$strokeMiterlimit
public
mixed
$strokeMiterlimit
$strokeOpacity
public
mixed
$strokeOpacity
$strokeWidth
public
mixed
$strokeWidth
$textAnchor
public
mixed
$textAnchor
= 'start'
Methods
convertSize()
Convert a size to a float
public
static convertSize(string $size[, float $referenceSize = 11.0 ][, float $dpi = 96.0 ]) : float|null
Parameters
- $size : string
-
SVG size
- $referenceSize : float = 11.0
-
Reference size
- $dpi : float = 96.0
-
DPI
Return values
float|null —fromAttributes()
public
fromAttributes( $attributes) : Style
Parameters
Return values
Style —fromStyleSheets()
public
fromStyleSheets(AbstractTag $tag, mixed $attributes) : mixed
Parameters
- $tag : AbstractTag
- $attributes : mixed
Return values
mixed —getTriplet()
public
static getTriplet(mixed $color[, mixed $percent = false ]) : mixed
Parameters
- $color : mixed
- $percent : mixed = false
Return values
mixed —inherit()
public
inherit(AbstractTag $tag) : mixed
Parameters
- $tag : AbstractTag
Return values
mixed —parseColor()
public
static parseColor(mixed $color) : mixed
Parameters
- $color : mixed
Return values
mixed —parseCssStyle()
Simple CSS parser
public
static parseCssStyle( $style) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed> —parseHexColor()
public
static parseHexColor(mixed $hex) : mixed
Parameters
- $hex : mixed
Return values
mixed —fillStyles()
protected
fillStyles(mixed $styles) : mixed
Parameters
- $styles : mixed
Return values
mixed —getStyleMap()
protected
getStyleMap() : mixed