Graphics code revamp

5 views
Skip to first unread message

Chris

unread,
Mar 1, 2011, 7:26:38 PM3/1/11
to Lepton Developers
The ng-branch of Lepton have received quite the revamp. Unfortunately
this change is bound to break some implementations, so this is a heads
up on what to change where if this affects you.

* The generic class Color is now abstract and the proper class to use
is RgbColor.
* Drawing can not be performed directly against the canvas. In order
to paint onto a canvas, you need to create a new CanvasPainter
instance, either using "new CanvasPainter($canvas)" or using "$canvas-
>getPainter().
* Filters are broken for the moment, but will be fixed asap. So for
now try to avoid using any filter functionality.
* Interfaces have been created for drawables (objects that can draw
themself onto a canvas) and canvas (objects chat can be drawn onto).

Do note that ALL canvases are also drawables, but not all drawables
are canvases.

For more information about these changes, see
http://trac.noccy.com/lepton-php/wiki/LeptonNG/Modules/Graphics
Reply all
Reply to author
Forward
0 new messages