|
Simple Graphics Library
0.9.5
SGL API
|
#include <sgl.h>


Public Member Functions | |
| BitmapObject (const char *filename, double x, double y, double width, double height) | |
| void | paint () const |
Public Member Functions inherited from sgl::GraphicalObject | |
| GraphicalObject (double left, double bottom, double width, double height) | |
| GraphicalObject (const GraphicalObject &other) | |
| GraphicalObject & | operator= (const GraphicalObject &other) |
| virtual | ~GraphicalObject () |
| virtual double | get_left () const |
| virtual double | get_bottom () const |
| virtual double | get_width () const |
| virtual double | get_height () const |
| virtual void | set (double x, double y, double width, double height) |
| virtual void | move_to (double left, double bottom) |
| virtual void | mouse_pressed (double x, double y, MouseButton button) |
| virtual void | mouse_released (double x, double y, MouseButton button) |
| virtual void | mouse_moved (double x, double y) |
| virtual void | mouse_dragged (double x, double y) |
| virtual void | key_pressed (int k, double x, double y) |
| virtual bool | hit (double x, double y) |
| virtual Window * | set_window (ObjectWindow *win) |
| virtual Window * | get_window () const |
| virtual void | set_mouse_over (bool flag) |
| virtual CursorShape | set_cursor (CursorShape cursor) |
| virtual CursorShape | get_cursor () |
Additional Inherited Members | |
Public Attributes inherited from sgl::GraphicalObject | |
| const unsigned | id |
Protected Attributes inherited from sgl::GraphicalObject | |
| ObjectWindow * | window |
| double | x_hit_offset |
| double | y_hit_offset |
| double | left |
| double | bottom |
| double | width |
| double | height |
| CursorShape | cursor |
| bool | mouse_over |
The class representing graphical objects that render bitmapped images. The image for a graphical object is loaded from a 24-bit uncompressed BMP file with dimensions that must be binary powers.
| sgl::BitmapObject::BitmapObject | ( | const char * | filename, |
| double | x, | ||
| double | y, | ||
| double | width, | ||
| double | height | ||
| ) |
Constructor
| filename | the BMP file containing the image to display. |
| x | the x coordinate of the bitmap image's left-bottom corner |
| y | the y coordinate of the bitmap image's left-bottom corner |
| width | the bitmap image's width |
| height | the bitmap image's height |
|
virtual |
Draws the bitmap image within the window.
Implements sgl::GraphicalObject.
1.8.13