Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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

(no description)

File Size: 249 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: resource