#include <image.h>
Public Member Functions | |
Construction | |
| CL_Image () | |
| Constructs a null image. | |
| CL_Image (CL_GraphicContext &context, CL_Texture texture, CL_Rect rect) | |
| Constructs an image from a texture. | |
| CL_Image (CL_GraphicContext &context, CL_Subtexture &sub_texture) | |
| Constructs an image from a subtexture. | |
| CL_Image (CL_GraphicContext &gc, const CL_PixelBuffer &pixelbuffer) | |
| Constructs a Image from a pixelbuffer. | |
| CL_Image (CL_GraphicContext &context, const CL_StringRef &filename) | |
| Constructs a Image. | |
| CL_Image (CL_GraphicContext &context, const CL_StringRef &filename, CL_VirtualDirectory &dir) | |
| Constructs a Image. | |
| CL_Image (CL_GraphicContext &context, const CL_StringRef &resource_id, CL_ResourceManager *resources) | |
| Constructs a Image. | |
| virtual | ~CL_Image () |
Attributes | |
| bool | is_null () const |
| Returns true if the image is not properly constructed. | |
| float | get_scale_x () const |
| Returns x scale. | |
| float | get_scale_y () const |
| Returns y scale. | |
| float | get_alpha () const |
| Returns current alpha. | |
| CL_Colorf | get_color () const |
| Returns current color. | |
| void | get_alignment (CL_Origin &origin, int &x, int &y) const |
| Returns translation hot-spot. | |
| CL_Size | get_size () const |
| Get Size. | |
| int | get_width () const |
| Return the width of the image. | |
| int | get_height () const |
| Return the height of the image. | |
Operators | |
| bool | operator== (const CL_Image &other) const |
| Equality operator. | |
| bool | operator!= (const CL_Image &other) const |
| Inequality operator. | |
| bool | operator< (const CL_Image &other) const |
| Less than operator. | |
Operations | |
| void | draw (CL_GraphicContext &gc, float x, float y) const |
| Draw image on graphic context. | |
| void | draw (CL_GraphicContext &gc, int x, int y) const |
| void | draw (CL_GraphicContext &gc, const CL_Rectf &src, const CL_Rectf &dest) const |
| void | draw (CL_GraphicContext &gc, const CL_Rectf &dest) const |
| void | set_scale (float x, float y) |
| Set scale for x and y directions individually. | |
| void | set_alpha (float alpha) |
| Sets transparency. | |
| void | set_color (const CL_Colorf &color) |
| Sets the color. | |
| void | set_color (const CL_Color &c) |
| Set color. | |
| void | set_alignment (CL_Origin origin, int x=0, int y=0) |
| Sets translation hotspot. | |
|
|
Constructs a null image.
|
|
||||||||||||||||
|
Constructs an image from a texture.
|
|
||||||||||||
|
Constructs an image from a subtexture.
|
|
||||||||||||
|
Constructs a Image from a pixelbuffer.
|
|
||||||||||||
|
Constructs a Image.
|
|
||||||||||||||||
|
Constructs a Image.
|
|
||||||||||||||||
|
Constructs a Image.
|
|
|
|
|
||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
|
|
||||||||||||||||
|
Draw image on graphic context.
|
|
||||||||||||||||
|
Returns translation hot-spot.
|
|
|
Returns current alpha. Alpha 0.0f is full transparency, and 1.0f is full visibility (solid). |
|
|
Returns current color. Alpha 0.0f is full transparency, and 1.0f is full visibility (solid). |
|
|
Return the height of the image.
|
|
|
Returns x scale. 1.0f is normal scale, 2.0f is twice the size, etc. |
|
|
Returns y scale. 1.0f is normal scale, 2.0f is twice the size, etc. |
|
|
Get Size.
|
|
|
Return the width of the image.
|
|
|
Returns true if the image is not properly constructed.
|
|
|
Inequality operator.
|
|
|
Less than operator.
|
|
|
Equality operator.
|
|
||||||||||||||||
|
Sets translation hotspot.
|
|
|
Sets transparency. Alpha 0.0f is full transparency, and 1.0f is full visibility (solid). |
|
|
Set color.
|
|
|
Sets the color. Alpha 0.0f is full transparency, and 1.0f is full visibility (solid). |
|
||||||||||||
|
Set scale for x and y directions individually. 1.0f is normal scale, 2.0f is twice the size, etc. |
1.4.6