sagittariusx / beluga.drawing
Some helpful image drawing tools.
Installs: 19
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/sagittariusx/beluga.drawing
Requires
- php: >=7.0
- sagittariusx/beluga.core: ^0.1.0
- sagittariusx/beluga.dynamic-properties: ^0.1.0
- sagittariusx/beluga.io: ^0.1.1
This package is not auto-updated.
Last update: 2025-12-15 12:07:46 UTC
README
Some helpful image and drawing tools.
composer require sagittariusx/beluga.drawing
or include it inside you're composer.json
{
"require": {
"php": ">=7.0",
"sagittariusx/beluga.drawing": "^0.1.0"
}
}
The library declares the main classes inside the Beluga\Drawing namespace:
Beluga\Drawing\Size: Declares the 2 dimensional size of an object (width + height) and some helpful methodsBeluga\Drawing\Point: Declares the 2 dimensional location of an object (x + y) and some helpful methods.Beluga\Drawing\Rectangle: Declares the 2 dimensional size and location of an object. It is an combination of the 2 classesSizeandPoint.Beluga\Drawing\Gravity: Interface that declares constants for define the 2 dimensional gravity of an object. The gravity means values that define the align of an object inside an other. (e.G.Gravity::TOP_LEFT)Beluga\Drawing\ContentAlign: An other way to define the content align of an object inside an otherBeluga\Drawing\ColorTool: A static helper class for color handling.Beluga\Drawing\ColorThis class define and handle all information of a color. (R, G, B, Opacity/Alpha, HEX-Format, Color name).Beluga\Drawing\ColorGdextends from Color class and is more GD specific.
The sub namespace Beluga\Drawing\Image declares the following:
Beluga\Drawing\Image\IImage: This interfaces defines all features, required by a valid image implementation.Beluga\Drawing\Image\AbstractImage: This abstract class implements the main image functionality (not much) usable by allIImageimplementations.Beluga\Drawing\Image\GdImage: This is currently the only usableIImageimplementation. It works completely with PHPs basic GD graphics library.Beluga\Drawing\Image\ImageSizeReducer: A tool for resizing anIImageimplementation, that can store and restore the current size reducing settings fromXML(writing=XMLWriterand reading=SimpleXMLElement),ArrayandJSONstringBeluga\Drawing\Image\ImageSizeReducerType: Declares all usable image size reducer types. (e.g.:ImageSizeReducerType::LONG_SIDE)Beluga\Drawing\Image\ImageSizeReducerCollection: Defines a collection ofBeluga\Drawing\Image\ImageSizeReduceritems.