Gd
extends AbstractDrawingAdapter
in package
Abstract drawing.
Table of Contents
Constants
- MIMETYPE_DEFAULT = 'image/png'
- MIMETYPE_GIF = 'image/gif'
- MIMETYPE_JPEG = 'image/jpeg'
- MIMETYPE_PNG = 'image/png'
- RENDERING_DEFAULT = 'imagepng'
- RENDERING_GIF = 'imagegif'
- RENDERING_JPEG = 'imagejpeg'
- RENDERING_PNG = 'imagepng'
Properties
- $relationId : string
- Slide relation ID (should not be used by user code!).
- $container : null|ShapeContainerInterface
- Container.
- $description : string
- Description.
- $height : int
- Height.
- $hyperlink : null|Hyperlink
- $imageResource : resource
- Image resource.
- $mimeType : string
- Mime type.
- $name : string
- Name.
- $offsetX : int
- Offset X.
- $offsetY : int
- Offset Y.
- $path : string
- $placeholder : null|Placeholder
- $renderingFunction : string
- Rendering function.
- $resizeProportional : bool
- Proportional resize.
- $rotation : int
- Rotation.
- $shadow : null|Shadow
- Shadow.
- $uniqueName : string
- Unique name.
- $width : int
- Width.
- $border : Border
- Border.
- $fill : null|Fill
- $hashIndex : int
- Hash index.
- $imageCounter : int
- Image counter.
- $imageIndex : int
- Image index.
Methods
- __clone() : mixed
- Magic Method : clone.
- __construct() : mixed
- Gd constructor.
- getBorder() : Border
- getContainer() : ShapeContainerInterface|null
- Get Container, Slide or Group.
- getContents() : string
- getDescription() : string
- Get Description.
- getExtension() : string
- getFill() : Fill|null
- getHashCode() : string
- Get hash code.
- getHashIndex() : null|int
- Get hash index.
- getHeight() : int
- Get Height.
- getHyperlink() : Hyperlink
- Get Hyperlink.
- getImageIndex() : int
- Get image index.
- getImageResource() : resource
- Get image resource.
- getIndexedFilename() : string
- getMimeType() : string
- Get mime type.
- getName() : string
- Get Name.
- getOffsetX() : int
- Get OffsetX.
- getOffsetY() : int
- Get OffsetY.
- getPath() : string
- Get Path.
- getPlaceholder() : Placeholder|null
- getRenderingFunction() : string
- Get rendering function.
- getRotation() : int
- Get Rotation.
- getShadow() : Shadow|null
- getWidth() : int
- Get Width.
- hasHyperlink() : bool
- Has Hyperlink?
- isPlaceholder() : bool
- isResizeProportional() : bool
- Get ResizeProportional.
- setContainer() : $this
- Set Container, Slide or Group.
- setDescription() : $this
- Set Description.
- setFill() : self
- setHashIndex() : $this
- Set hash index.
- setHeight() : self
- Set Height.
- setHyperlink() : self
- Set Hyperlink.
- setImageResource() : $this
- Set image resource.
- setMimeType() : $this
- Set mime type.
- setName() : static
- Set Name.
- setOffsetX() : $this
- Set OffsetX.
- setOffsetY() : $this
- Set OffsetY.
- setPath() : self
- setPlaceHolder() : self
- setRenderingFunction() : $this
- Set rendering function.
- setResizeProportional() : self
- Set ResizeProportional.
- setRotation() : $this
- Set Rotation.
- setShadow() : $this
- setWidth() : self
- Set Width.
- setWidthAndHeight() : self
- Set width and height with proportional resize.
Constants
MIMETYPE_DEFAULT
public
mixed
MIMETYPE_DEFAULT
= 'image/png'
MIMETYPE_GIF
public
mixed
MIMETYPE_GIF
= 'image/gif'
MIMETYPE_JPEG
public
mixed
MIMETYPE_JPEG
= 'image/jpeg'
MIMETYPE_PNG
public
mixed
MIMETYPE_PNG
= 'image/png'
RENDERING_DEFAULT
public
mixed
RENDERING_DEFAULT
= 'imagepng'
RENDERING_GIF
public
mixed
RENDERING_GIF
= 'imagegif'
RENDERING_JPEG
public
mixed
RENDERING_JPEG
= 'imagejpeg'
RENDERING_PNG
public
mixed
RENDERING_PNG
= 'imagepng'
Properties
$relationId
Slide relation ID (should not be used by user code!).
public
string
$relationId
$container
Container.
protected
null|ShapeContainerInterface
$container
$description
Description.
protected
string
$description
$height
Height.
protected
int
$height
$hyperlink
protected
null|Hyperlink
$hyperlink
$imageResource
Image resource.
protected
resource
$imageResource
$mimeType
Mime type.
protected
string
$mimeType
= self::MIMETYPE_DEFAULT
$name
Name.
protected
string
$name
= ''
$offsetX
Offset X.
protected
int
$offsetX
$offsetY
Offset Y.
protected
int
$offsetY
$path
protected
string
$path
$placeholder
protected
null|Placeholder
$placeholder
$renderingFunction
Rendering function.
protected
string
$renderingFunction
= self::RENDERING_DEFAULT
$resizeProportional
Proportional resize.
protected
bool
$resizeProportional
$rotation
Rotation.
protected
int
$rotation
$shadow
Shadow.
protected
null|Shadow
$shadow
$uniqueName
Unique name.
protected
string
$uniqueName
$width
Width.
protected
int
$width
$border
Border.
private
Border
$border
$fill
private
null|Fill
$fill
$hashIndex
Hash index.
private
int
$hashIndex
$imageCounter
Image counter.
private
static int
$imageCounter
= 0
$imageIndex
Image index.
private
int
$imageIndex
= 0
Methods
__clone()
Magic Method : clone.
public
__clone() : mixed
__construct()
Gd constructor.
public
__construct() : mixed
getBorder()
public
getBorder() : Border
Return values
BordergetContainer()
Get Container, Slide or Group.
public
getContainer() : ShapeContainerInterface|null
Return values
ShapeContainerInterface|nullgetContents()
public
getContents() : string
Return values
stringgetDescription()
Get Description.
public
getDescription() : string
Return values
stringgetExtension()
public
getExtension() : string
Return values
stringgetFill()
public
getFill() : Fill|null
Return values
Fill|nullgetHashCode()
Get hash code.
public
getHashCode() : string
Return values
string —Hash code
getHashIndex()
Get hash index.
public
getHashIndex() : null|int
Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.
Return values
null|int —Hash index
getHeight()
Get Height.
public
getHeight() : int
Return values
intgetHyperlink()
Get Hyperlink.
public
getHyperlink() : Hyperlink
Return values
HyperlinkgetImageIndex()
Get image index.
public
getImageIndex() : int
Return values
intgetImageResource()
Get image resource.
public
getImageResource() : resource
Return values
resourcegetIndexedFilename()
public
getIndexedFilename() : string
Return values
stringgetMimeType()
Get mime type.
public
getMimeType() : string
Return values
stringgetName()
Get Name.
public
getName() : string
Return values
stringgetOffsetX()
Get OffsetX.
public
getOffsetX() : int
Return values
intgetOffsetY()
Get OffsetY.
public
getOffsetY() : int
Return values
intgetPath()
Get Path.
public
getPath() : string
Return values
stringgetPlaceholder()
public
getPlaceholder() : Placeholder|null
Return values
Placeholder|nullgetRenderingFunction()
Get rendering function.
public
getRenderingFunction() : string
Return values
stringgetRotation()
Get Rotation.
public
getRotation() : int
Return values
intgetShadow()
public
getShadow() : Shadow|null
Return values
Shadow|nullgetWidth()
Get Width.
public
getWidth() : int
Return values
inthasHyperlink()
Has Hyperlink?
public
hasHyperlink() : bool
Return values
boolisPlaceholder()
public
isPlaceholder() : bool
Return values
boolisResizeProportional()
Get ResizeProportional.
public
isResizeProportional() : bool
Return values
boolsetContainer()
Set Container, Slide or Group.
public
setContainer([ShapeContainerInterface|null $pValue = null ][, bool $pOverrideOld = false ]) : $this
Parameters
- $pValue : ShapeContainerInterface|null = null
- $pOverrideOld : bool = false
-
If a Slide has already been assigned, overwrite it and remove image from old Slide?
Return values
$thissetDescription()
Set Description.
public
setDescription([string $pValue = '' ]) : $this
Parameters
- $pValue : string = ''
Return values
$thissetFill()
public
setFill([Fill|null $pValue = null ]) : self
Parameters
- $pValue : Fill|null = null
Return values
selfsetHashIndex()
Set hash index.
public
setHashIndex(int $value) : $this
Note that this index may vary during script execution! Only reliable moment is while doing a write of a workbook and when changes are not allowed.
Parameters
- $value : int
-
Hash index
Return values
$thissetHeight()
Set Height.
public
setHeight([int $pValue = 0 ]) : self
Parameters
- $pValue : int = 0
Return values
selfsetHyperlink()
Set Hyperlink.
public
setHyperlink([Hyperlink|null $pHyperlink = null ]) : self
Parameters
- $pHyperlink : Hyperlink|null = null
Return values
selfsetImageResource()
Set image resource.
public
setImageResource([resource $value = null ]) : $this
Parameters
- $value : resource = null
Return values
$thissetMimeType()
Set mime type.
public
setMimeType([string $value = self::MIMETYPE_DEFAULT ]) : $this
Parameters
- $value : string = self::MIMETYPE_DEFAULT
Return values
$thissetName()
Set Name.
public
setName([string $pValue = '' ]) : static
Parameters
- $pValue : string = ''
Return values
staticsetOffsetX()
Set OffsetX.
public
setOffsetX([int $pValue = 0 ]) : $this
Parameters
- $pValue : int = 0
Return values
$thissetOffsetY()
Set OffsetY.
public
setOffsetY([int $pValue = 0 ]) : $this
Parameters
- $pValue : int = 0
Return values
$thissetPath()
public
setPath(string $path) : self
Parameters
- $path : string
Return values
selfsetPlaceHolder()
public
setPlaceHolder(Placeholder $placeholder) : self
Parameters
- $placeholder : Placeholder
Return values
selfsetRenderingFunction()
Set rendering function.
public
setRenderingFunction([string $value = self::RENDERING_DEFAULT ]) : $this
Parameters
- $value : string = self::RENDERING_DEFAULT
Return values
$thissetResizeProportional()
Set ResizeProportional.
public
setResizeProportional([bool $pValue = true ]) : self
Parameters
- $pValue : bool = true
Return values
selfsetRotation()
Set Rotation.
public
setRotation([int $pValue = 0 ]) : $this
Parameters
- $pValue : int = 0
Return values
$thissetShadow()
public
setShadow([Shadow|null $pValue = null ]) : $this
Parameters
- $pValue : Shadow|null = null
Return values
$thissetWidth()
Set Width.
public
setWidth([int $pValue = 0 ]) : self
Parameters
- $pValue : int = 0
Return values
selfsetWidthAndHeight()
Set width and height with proportional resize.
public
setWidthAndHeight([int $width = 0 ][, int $height = 0 ]) : self
Parameters
- $width : int = 0
- $height : int = 0