Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

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

(no description)

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

Defines 1 class


Class: Drawing  - X-Ref

pixelsToEMU($pValue)   X-Ref
Convert pixels to EMU.

param: int $pValue Value in pixels
return: int Value in EMU

EMUToPixels($pValue)   X-Ref
Convert EMU to pixels.

param: int $pValue Value in EMU
return: int Value in pixels

pixelsToCellDimension($pValue, \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont)   X-Ref
Convert pixels to column width. Exact algorithm not known.
By inspection of a real Excel file using Calibri 11, one finds 1000px ~ 142.85546875
This gives a conversion factor of 7. Also, we assume that pixels and font size are proportional.

param: int $pValue Value in pixels
param: \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont Default font of the workbook
return: int Value in cell dimension

cellDimensionToPixels($pValue, \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont)   X-Ref
Convert column width from (intrinsic) Excel units to pixels.

param: float $pValue Value in cell dimension
param: \PhpOffice\PhpSpreadsheet\Style\Font $pDefaultFont Default font of the workbook
return: int Value in pixels

pixelsToPoints($pValue)   X-Ref
Convert pixels to points.

param: int $pValue Value in pixels
return: float Value in points

pointsToPixels($pValue)   X-Ref
Convert points to pixels.

param: int $pValue Value in points
return: int Value in pixels

degreesToAngle($pValue)   X-Ref
Convert degrees to angle.

param: int $pValue Degrees
return: int Angle

angleToDegrees($pValue)   X-Ref
Convert angle to degrees.

param: int $pValue Angle
return: int Degrees

imagecreatefrombmp($p_sFile)   X-Ref
Create a new image from file. By alexander at alexauto dot nl.

param: string $p_sFile Path to Windows DIB (BMP) image
return: GdImage|resource