Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250620) (7d9030acd6e)
PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing Class Reference
Inheritance diagram for PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing:
PhpOffice\PhpSpreadsheet\IComparable PhpOffice\PhpSpreadsheet\Worksheet\Drawing PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing

Public Member Functions

 __construct ()
 Create a new BaseDrawing.
 
 __clone ()
 Implement PHP __clone to create a deep clone, not just a shallow copy.
 
 getCoordinates ()
 
 getCoordinates2 ()
 
 getDescription ()
 
 getEditAs ()
 
 getFlipHorizontal ()
 
 getFlipVertical ()
 
 getHashCode ()
 Get hash code.
 
 getHeight ()
 
 getHyperlink ()
 
 getImageHeight ()
 
 getImageIndex ()
 
 getImageWidth ()
 
 getName ()
 
 getOffsetX ()
 
 getOffsetX2 ()
 
 getOffsetY ()
 
 getOffsetY2 ()
 
 getOpacity ()
 
 getResizeProportional ()
 
 getRotation ()
 
 getShadow ()
 
 getSrcRect ()
 
 getType ()
 Get Image Type.
 
 getWidth ()
 
 getWorksheet ()
 
 setCoordinates (string $coordinates)
 
 setCoordinates2 (string $coordinates2)
 
 setDescription (string $description)
 
 setEditAs (string $editAs)
 
 setFlipHorizontal (bool $flipHorizontal)
 
 setFlipVertical (bool $flipVertical)
 
 setHeight (int $height)
 
 setHyperlink (?Hyperlink $hyperlink=null)
 
 setName (string $name)
 
 setOffsetX (int $offsetX)
 
 setOffsetX2 (int $offsetX2)
 
 setOffsetY (int $offsetY)
 
 setOffsetY2 (int $offsetY2)
 
 setOpacity (?int $opacity)
 
 setResizeProportional (bool $resizeProportional)
 
 setRotation (int $rotation)
 
 setShadow (?Shadow $shadow=null)
 
 setSrcRect ($srcRect)
 
 setWidth (int $width)
 
 setWidthAndHeight (int $width, int $height)
 Set width and height with proportional resize.
 
 setWorksheet (?Worksheet $worksheet=null, bool $overrideOld=false)
 Set Worksheet.
 
 validEditAs ()
 

Public Attributes

const EDIT_AS_ABSOLUTE = 'absolute'
 
const EDIT_AS_ONECELL = 'oneCell'
 
const EDIT_AS_TWOCELL = 'twoCell'
 

Protected Member Functions

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

Protected Attributes

string $coordinates = 'A1'
 Coordinates.
 
string $coordinates2 = ''
 Coordinates2.
 
string $description = ''
 Description.
 
string $editAs = ''
 
bool $flipHorizontal = false
 
bool $flipVertical = false
 
int $height = 0
 Height.
 
int $imageHeight = 0
 Pixel width of image.
 
int $imageWidth = 0
 Pixel width of image.
 
string $name = ''
 Name.
 
int $offsetX = 0
 Offset X.
 
int $offsetX2 = 0
 Offset X2.
 
int $offsetY = 0
 Offset Y.
 
int $offsetY2 = 0
 Offset Y2.
 
int $opacity = null
 Percentage multiplied by 100,000, e.g.
 
bool $resizeProportional = true
 Proportional resize.
 
int $rotation = 0
 Rotation.
 
Shadow $shadow
 Shadow.
 
null SimpleXMLElement string[] $srcRect = []
 
int $type = IMAGETYPE_UNKNOWN
 Image type.
 
int $width = 0
 Width.
 
Worksheet $worksheet = null
 Worksheet.
 

Constructor & Destructor Documentation

◆ __construct()

PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing::__construct ( )

Member Function Documentation

◆ __clone()

PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing::__clone ( )

Implement PHP __clone to create a deep clone, not just a shallow copy.

Reimplemented in PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing.

◆ getHashCode()

PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing::getHashCode ( )

Get hash code.

Return values
stringHash code

Implements PhpOffice\PhpSpreadsheet\IComparable.

Reimplemented in PhpOffice\PhpSpreadsheet\Worksheet\Drawing, and PhpOffice\PhpSpreadsheet\Worksheet\MemoryDrawing.

◆ getSrcRect()

PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing::getSrcRect ( )
Return values
null|SimpleXMLElement|string[]

◆ setSrcRect()

PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing::setSrcRect ( $srcRect)
Parameters
null | SimpleXMLElement | string[]$srcRect

◆ setWidthAndHeight()

PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing::setWidthAndHeight ( int $width,
int $height )

Set width and height with proportional resize.

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

Author
Vincent@luo MSN:kele_.nosp@m.100@.nosp@m.hotma.nosp@m.il.c.nosp@m.om

◆ setWorksheet()

PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing::setWorksheet ( ?Worksheet $worksheet = null,
bool $overrideOld = false )

Set Worksheet.

Parameters
bool$overrideOldIf a Worksheet has already been assigned, overwrite it and remove image from old Worksheet?

Member Data Documentation

◆ $imageHeight

int PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing::$imageHeight = 0
protected

Pixel width of image.

See $height for the size the Drawing will be in the sheet.

◆ $imageWidth

int PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing::$imageWidth = 0
protected

Pixel width of image.

See $width for the size the Drawing will be in the sheet.

◆ $opacity

int PhpOffice\PhpSpreadsheet\Worksheet\BaseDrawing::$opacity = null
protected

Percentage multiplied by 100,000, e.g.

40% = 40,000. Opacity=x is the same as transparency=100000-x.


The documentation for this class was generated from the following file: