Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
#include <DrawPixels.hpp>
Public Member Functions | |
| Pixels () | |
| Pixels (Image *img, int scrx, int scry, int startx=0, int starty=0, int width=-1, int height=-1, int alignment=AlignBottom|AlignLeft) | |
| Constructor. | |
| Pixels (const Pixels &other) | |
| Pixels & | operator= (const Pixels &other) |
| ~Pixels () | |
| const ivec2 & | position () const |
| const ivec2 & | start () const |
| const ivec2 & | size () const |
| void | setPosition (const ivec2 &position) |
| void | setStart (const ivec2 &start) |
| void | setSize (const ivec2 &size) |
| Image * | image () |
| const Image * | image () const |
| int | align () const |
| void | setAlign (int align) |
| bool | generatePixelBufferObject (EGLBufferUsage usage, bool discard_local_storage) |
| Generates a pixel buffer object for the associated Image calling image()->gpuBuffer()->setBufferData(usage, discard_local_storage);. | |
| void | deletePixelBufferObject () |
| bool | hasPixelBufferObject () const |
Protected Attributes | |
| ref< Image > | mImage |
| ivec2 | mPosition |
| ivec2 | mStart |
| ivec2 | mSize |
| int | mAlign |
Friends | |
| class | DrawPixels |
| DrawPixels::Pixels::Pixels | ( | ) |
| DrawPixels::Pixels::Pixels | ( | Image * | img, | |
| int | scrx, | |||
| int | scry, | |||
| int | startx = 0, |
|||
| int | starty = 0, |
|||
| int | width = -1, |
|||
| int | height = -1, |
|||
| int | alignment = AlignBottom | AlignLeft | |||
| ) |
Constructor.
The parameters 'scrx' and 'scry' define the position of the viewport in pixels where the image has to be placed. If a Transform is attached to the Actor using DrawPixels scrx, scry follow the transform on the screen. The parameters 'startx', 'starty', 'width' and 'height' define the sub-portion of the Image to be rendered. The parameters 'width' and 'height' can be -1, in this case they will be automatically set so that the Image is shown until the top-right edge.
| DrawPixels::Pixels::Pixels | ( | const Pixels & | other | ) |
| DrawPixels::Pixels::~Pixels | ( | ) |
| DrawPixels::Pixels & DrawPixels::Pixels::operator= | ( | const Pixels & | other | ) |
| const ivec2& vl::DrawPixels::Pixels::position | ( | ) | const [inline] |
| const ivec2& vl::DrawPixels::Pixels::start | ( | ) | const [inline] |
| const ivec2& vl::DrawPixels::Pixels::size | ( | ) | const [inline] |
| void vl::DrawPixels::Pixels::setPosition | ( | const ivec2 & | position | ) | [inline] |
| void vl::DrawPixels::Pixels::setStart | ( | const ivec2 & | start | ) | [inline] |
| void vl::DrawPixels::Pixels::setSize | ( | const ivec2 & | size | ) | [inline] |
| Image* vl::DrawPixels::Pixels::image | ( | ) | [inline] |
| const Image* vl::DrawPixels::Pixels::image | ( | ) | const [inline] |
| int vl::DrawPixels::Pixels::align | ( | ) | const [inline] |
| void vl::DrawPixels::Pixels::setAlign | ( | int | align | ) | [inline] |
| bool DrawPixels::Pixels::generatePixelBufferObject | ( | EGLBufferUsage | usage, | |
| bool | discard_local_storage | |||
| ) |
| void DrawPixels::Pixels::deletePixelBufferObject | ( | ) |
| bool DrawPixels::Pixels::hasPixelBufferObject | ( | ) | const |
friend class DrawPixels [friend] |
ref<Image> vl::DrawPixels::Pixels::mImage [protected] |
ivec2 vl::DrawPixels::Pixels::mPosition [protected] |
ivec2 vl::DrawPixels::Pixels::mStart [protected] |
ivec2 vl::DrawPixels::Pixels::mSize [protected] |
int vl::DrawPixels::Pixels::mAlign [protected] |