#include <IMG_CanvasRGBA32.h>
Inheritance diagram for IMG_CanvasRGBA32:
Public Methods | |
IMG_CanvasRGBA32 (TUns32 width,TUns32 height) | |
Constructor. More... | |
IMG_CanvasRGBA32 (void *image,TUns32 width,TUns32 height,TUns32 rowBytes) | |
Constructor. More... | |
virtual void | startStroke () |
Starts a stroke. More... | |
virtual void | drawStroke (TInt32 x1,TInt32 y1,TInt32 x2,TInt32 y2,const IMG_BrushRGBA32 &brush) |
Continues the stroke by drawing a line from the location 1 to location 2. More... | |
virtual void | drawStroke (float u1,float v1,float u2,float v2,const IMG_BrushRGBA32 &brush) |
Continues the stroke by drawing a line from the location 1 to location 2. More... | |
virtual IMG_CanvasRGBA32Action* | endStroke () |
Ends a stroke. More... | |
Protected Methods | |
virtual | ~IMG_CanvasRGBA32 () |
Destructor. More... | |
virtual void | draw (TInt32 xStart,TInt32 yStart,TInt32 xEnd,TInt32 yEnd,const IMG_BrushRGBA32 &brush,bool drawEndPoint=true) |
Draws a line from the start to the end point with the brush given. More... | |
Protected Attributes | |
IMG_PixmapRGBA32* | m_undoPixmap |
IMG_Rect | m_undoRect |
A IMG_BrushRGBA32 is used as brush for strokes. Strokes are a collection of lines drawn between points. When a stroke is finished, the canvas returns an action that can be used to undo/redo the stroke.
|
Constructor.
|
|
Constructor. The image data will not be freed upon destruction of this object. The owner of this object is reponsible for that.
|
|
Destructor. The destructor is protected since the canvas is a shared object. |
|
Draws a line from the start to the end point with the brush given. Repeatedly pastes the given brush centered at the given line into this pixmap. The alpha information in the brush is used to blend.
|
|
Continues the stroke by drawing a line from the location 1 to location 2. This will update the dirty rectangle.
|
|
Continues the stroke by drawing a line from the location 1 to location 2. This will update the dirty rectangle.
|
|
Ends a stroke. This will return an action that can be used to undo/redo the drawing of the stroke.
|
|
Starts a stroke. This will save the image and clear the dirty rectangle. |