#include <IMG_BrushRGBA32.h>
Inheritance diagram for IMG_BrushRGBA32:
Public Methods | |
IMG_BrushRGBA32 (TUns32 w,TUns32 h,const IMG_ColorRGB &c,float a=0.8f) | |
Constructs a brush image with the dimensions and color given. More... | |
virtual void | setColor (const IMG_ColorRGB &c) |
Sets the color of the brush. More... | |
virtual void | getColor (IMG_ColorRGB &c)const |
Returns the color of the brush. More... | |
virtual void | setTransparency (float a) |
Sets the transparency of the brush. More... | |
virtual float | getTransparency ()const |
Returns the transparency of the brush. More... | |
virtual void | setRadii (TUns32 rI,TUns32 rO) |
Sets the shape of the brush from two radii (inner and outer). More... | |
virtual void | getRadii (TUns32 &rI,TUns32 &rO)const |
Returns the radii that determine the shape of the brush. More... | |
Protected Methods | |
virtual void | updateImage () |
Updates the image of this brush. More... | |
Protected Attributes | |
IMG_ColorRGB | m_color |
float | m_alpha |
The color of the brush. | |
TUns32 | m_ri |
The transparency of the brush. | |
TUns32 | m_ro |
The inner radius of the brush. |
The brush is a pixmap as well. Drawing can be implemented by blending the brush into the pixmap.
|
Constructs a brush image with the dimensions and color given.
|
|
Returns the color of the brush.
|
|
Returns the radii that determine the shape of the brush.
|
|
Returns the transparency of the brush.
|
|
Sets the color of the brush.
|
|
Sets the shape of the brush from two radii (inner and outer). This creates a brush with alpha==0 inside the inner radius and gradually fades to alpha==1 at the outer radius. Inner radius should be smaller or equal to the outer radius. If not, the outer radius is made equal to the inner radius. If the either radius is larger than the bounds of the brush, they are clipped.
|
|
Sets the transparency of the brush.
|
|
Updates the image of this brush. The image is created using the current color, transparency and shape radii. |