Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 310 and 400] [Versions 311 and 400] [Versions 39 and 400] [Versions 400 and 401] [Versions 400 and 402] [Versions 400 and 403]

(no description)

File Size: 561 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

BaseDrawing:: (31 methods):
  __construct()
  getImageIndex()
  getName()
  setName()
  getDescription()
  setDescription()
  getWorksheet()
  setWorksheet()
  getCoordinates()
  setCoordinates()
  getOffsetX()
  setOffsetX()
  getOffsetY()
  setOffsetY()
  getWidth()
  setWidth()
  getHeight()
  setHeight()
  setWidthAndHeight()
  getResizeProportional()
  setResizeProportional()
  getRotation()
  setRotation()
  getShadow()
  setShadow()
  getHashCode()
  __clone()
  setHyperlink()
  getHyperlink()
  setSizesAndType()
  getType()


Class: BaseDrawing  - X-Ref

__construct()   X-Ref
Create a new BaseDrawing.


getImageIndex()   X-Ref
Get image index.

return: int

getName()   X-Ref
Get Name.

return: string

setName($name)   X-Ref
Set Name.

return: $this
param: string $name

getDescription()   X-Ref
Get Description.

return: string

setDescription($description)   X-Ref
Set Description.

return: $this
param: string $description

getWorksheet()   X-Ref
Get Worksheet.

return: null|Worksheet

setWorksheet(?Worksheet $worksheet = null, $overrideOld = false)   X-Ref
Set Worksheet.

return: $this
param: bool $overrideOld If a Worksheet has already been assigned, overwrite it and remove image from old Worksheet?

getCoordinates()   X-Ref
Get Coordinates.

return: string

setCoordinates($coordinates)   X-Ref
Set Coordinates.

return: $this
param: string $coordinates eg: 'A1'

getOffsetX()   X-Ref
Get OffsetX.

return: int

setOffsetX($offsetX)   X-Ref
Set OffsetX.

return: $this
param: int $offsetX

getOffsetY()   X-Ref
Get OffsetY.

return: int

setOffsetY($offsetY)   X-Ref
Set OffsetY.

return: $this
param: int $offsetY

getWidth()   X-Ref
Get Width.

return: int

setWidth($width)   X-Ref
Set Width.

return: $this
param: int $width

getHeight()   X-Ref
Get Height.

return: int

setHeight($height)   X-Ref
Set Height.

return: $this
param: int $height

setWidthAndHeight($width, $height)   X-Ref
Set width and height with proportional resize.

Example:
<code>
$objDrawing->setResizeProportional(true);
$objDrawing->setWidthAndHeight(160,120);
</code>

author: Vincent@luo MSN:kele_100@hotmail.com
return: $this
param: int $width
param: int $height

getResizeProportional()   X-Ref
Get ResizeProportional.

return: bool

setResizeProportional($resizeProportional)   X-Ref
Set ResizeProportional.

return: $this
param: bool $resizeProportional

getRotation()   X-Ref
Get Rotation.

return: int

setRotation($rotation)   X-Ref
Set Rotation.

return: $this
param: int $rotation

getShadow()   X-Ref
Get Shadow.

return: Drawing\Shadow

setShadow(?Drawing\Shadow $shadow = null)   X-Ref
Set Shadow.

return: $this

getHashCode()   X-Ref
Get hash code.

return: string Hash code

__clone()   X-Ref
Implement PHP __clone to create a deep clone, not just a shallow copy.


setHyperlink(?Hyperlink $hyperlink = null)   X-Ref
No description

getHyperlink()   X-Ref

return: null|Hyperlink

setSizesAndType(string $path)   X-Ref
Set Fact Sizes and Type of Image.


getType()   X-Ref
Get Image Type.