ImageStyle
in package
Size, position and wrapping of an image, read from VML or DrawingML, as an array for Style\Image.
Table of Contents
Constants
- EMU_PER_POINT : mixed = 12700
- H_POS : mixed = [\PhpOffice\PhpWord\Style\Frame::POS_ABSOLUTE,...
- H_POS_REL_TO : mixed = ['margin' => \PhpOffice\PhpWord\Style\Frame::PO...
- mso-position-horizontal-relative, and relativeFrom of wp:positionH
- V_POS : mixed = [\PhpOffice\PhpWord\Style\Frame::POS_ABSOLUTE,...
- V_POS_REL_TO : mixed = ['margin' => \PhpOffice\PhpWord\Style\Frame::PO...
- mso-position-vertical-relative, and relativeFrom of wp:positionV
- WRAP : mixed = ['square' => \PhpOffice\PhpWord\Style\Frame::WR...
Methods
- readDrawing() : array<string, float|string>
- Read the style of a DrawingML wp:inline or wp:anchor.
- readVml() : array<string, float|string>
- Read the style of a VML v:shape, as Word and the Word2007 writer write it.
- cssToPoint() : float|null
- A VML length in points; a number without a unit is in pixels.
- position() : array<string, string>
- Alignment and reference of the position, left out when Style\Frame does not know the value.
Constants
EMU_PER_POINT
private
mixed
EMU_PER_POINT
= 12700
H_POS
private
mixed
H_POS
= [\PhpOffice\PhpWord\Style\Frame::POS_ABSOLUTE, \PhpOffice\PhpWord\Style\Frame::POS_LEFT, \PhpOffice\PhpWord\Style\Frame::POS_CENTER, \PhpOffice\PhpWord\Style\Frame::POS_RIGHT, \PhpOffice\PhpWord\Style\Frame::POS_INSIDE, \PhpOffice\PhpWord\Style\Frame::POS_OUTSIDE]
H_POS_REL_TO
mso-position-horizontal-relative, and relativeFrom of wp:positionH
private
mixed
H_POS_REL_TO
= ['margin' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_MARGIN, 'page' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_PAGE, 'text' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_COLUMN, 'column' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_COLUMN, 'char' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_CHAR, 'character' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_CHAR, 'left-margin-area' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_LMARGIN, 'leftMargin' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_LMARGIN, 'right-margin-area' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_RMARGIN, 'rightMargin' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_RMARGIN, 'inner-margin-area' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_IMARGIN, 'insideMargin' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_IMARGIN, 'outer-margin-area' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_OMARGIN, 'outsideMargin' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_OMARGIN]
V_POS
private
mixed
V_POS
= [\PhpOffice\PhpWord\Style\Frame::POS_ABSOLUTE, \PhpOffice\PhpWord\Style\Frame::POS_TOP, \PhpOffice\PhpWord\Style\Frame::POS_CENTER, \PhpOffice\PhpWord\Style\Frame::POS_BOTTOM, \PhpOffice\PhpWord\Style\Frame::POS_INSIDE, \PhpOffice\PhpWord\Style\Frame::POS_OUTSIDE]
V_POS_REL_TO
mso-position-vertical-relative, and relativeFrom of wp:positionV
private
mixed
V_POS_REL_TO
= ['margin' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_MARGIN, 'page' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_PAGE, 'text' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_TEXT, 'paragraph' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_TEXT, 'line' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_LINE, 'top-margin-area' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_TMARGIN, 'topMargin' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_TMARGIN, 'bottom-margin-area' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_BMARGIN, 'bottomMargin' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_BMARGIN, 'inner-margin-area' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_IMARGIN, 'insideMargin' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_IMARGIN, 'outer-margin-area' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_OMARGIN, 'outsideMargin' => \PhpOffice\PhpWord\Style\Frame::POS_RELTO_OMARGIN]
WRAP
private
mixed
WRAP
= ['square' => \PhpOffice\PhpWord\Style\Frame::WRAP_SQUARE, 'tight' => \PhpOffice\PhpWord\Style\Frame::WRAP_TIGHT, 'through' => \PhpOffice\PhpWord\Style\Frame::WRAP_THROUGH, 'topAndBottom' => \PhpOffice\PhpWord\Style\Frame::WRAP_TOPBOTTOM]
Methods
readDrawing()
Read the style of a DrawingML wp:inline or wp:anchor.
public
static readDrawing(XMLReader $xmlReader, DOMElement $frame) : array<string, float|string>
Parameters
- $xmlReader : XMLReader
- $frame : DOMElement
Return values
array<string, float|string>readVml()
Read the style of a VML v:shape, as Word and the Word2007 writer write it.
public
static readVml(XMLReader $xmlReader, DOMElement $shape) : array<string, float|string>
Parameters
- $xmlReader : XMLReader
- $shape : DOMElement
Return values
array<string, float|string>cssToPoint()
A VML length in points; a number without a unit is in pixels.
private
static cssToPoint(string $value) : float|null
Parameters
- $value : string
Return values
float|nullposition()
Alignment and reference of the position, left out when Style\Frame does not know the value.
private
static position(string $hPos, string $hPosRelTo, string $vPos, string $vPosRelTo) : array<string, string>
Parameters
- $hPos : string
- $hPosRelTo : string
- $vPos : string
- $vPosRelTo : string