Visualization Library v1.0.3A lightweight C++ OpenGL middleware for 2D/3D graphics |
[Download] [Tutorials] [All Classes] [Grouped Classes] |
Represents a bitmap to be drawn on the screen. More...
#include <DrawPixels.hpp>
Public Member Functions | |
Pixels () | |
Pixels (ImagePBO *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) |
ImagePBO * | image () |
const ImagePBO * | image () const |
int | align () const |
void | setAlign (int align) |
bool | generatePixelBufferObject (EBufferObjectUsage usage, bool discard_local_storage) |
Generates a pixel buffer object for the associated Image calling image()->bufferObject()->setBufferData(usage, discard_local_storage);. | |
void | deletePixelBufferObject () |
bool | hasPixelBufferObject () const |
Protected Attributes | |
ref< ImagePBO > | mImage |
ivec2 | mPosition |
ivec2 | mStart |
ivec2 | mSize |
int | mAlign |
Friends | |
class | DrawPixels |
Represents a bitmap to be drawn on the screen.
Definition at line 71 of file DrawPixels.hpp.
DrawPixels::Pixels::Pixels | ( | ) |
Definition at line 44 of file DrawPixels.cpp.
References vl::AlignBottom, vl::AlignLeft, mAlign, and VL_DEBUG_SET_OBJECT_NAME.
DrawPixels::Pixels::Pixels | ( | ImagePBO * | 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.
Definition at line 50 of file DrawPixels.cpp.
References vl::Image::height(), VL_DEBUG_SET_OBJECT_NAME, and vl::Image::width().
DrawPixels::Pixels::Pixels | ( | const Pixels & | other ) |
Definition at line 68 of file DrawPixels.cpp.
References VL_DEBUG_SET_OBJECT_NAME.
DrawPixels::Pixels::~Pixels | ( | ) |
Definition at line 85 of file DrawPixels.cpp.
DrawPixels::Pixels & DrawPixels::Pixels::operator= | ( | const Pixels & | other ) |
const ivec2& vl::DrawPixels::Pixels::position | ( | ) | const [inline] |
Definition at line 92 of file DrawPixels.hpp.
const ivec2& vl::DrawPixels::Pixels::start | ( | ) | const [inline] |
Definition at line 94 of file DrawPixels.hpp.
const ivec2& vl::DrawPixels::Pixels::size | ( | ) | const [inline] |
Definition at line 96 of file DrawPixels.hpp.
void vl::DrawPixels::Pixels::setPosition | ( | const ivec2 & | position ) | [inline] |
Definition at line 98 of file DrawPixels.hpp.
void vl::DrawPixels::Pixels::setStart | ( | const ivec2 & | start ) | [inline] |
Definition at line 100 of file DrawPixels.hpp.
void vl::DrawPixels::Pixels::setSize | ( | const ivec2 & | size ) | [inline] |
Definition at line 102 of file DrawPixels.hpp.
ImagePBO* vl::DrawPixels::Pixels::image | ( | ) | [inline] |
Definition at line 104 of file DrawPixels.hpp.
Referenced by vl::DrawPixels::render_Implementation().
const ImagePBO* vl::DrawPixels::Pixels::image | ( | ) | const [inline] |
Definition at line 106 of file DrawPixels.hpp.
int vl::DrawPixels::Pixels::align | ( | ) | const [inline] |
Definition at line 108 of file DrawPixels.hpp.
Referenced by vl::DrawPixels::render_Implementation().
void vl::DrawPixels::Pixels::setAlign | ( | int | align ) | [inline] |
Definition at line 110 of file DrawPixels.hpp.
bool DrawPixels::Pixels::generatePixelBufferObject | ( | EBufferObjectUsage | usage, |
bool | discard_local_storage | ||
) |
void DrawPixels::Pixels::deletePixelBufferObject | ( | ) |
Definition at line 89 of file DrawPixels.cpp.
bool DrawPixels::Pixels::hasPixelBufferObject | ( | ) | const |
Definition at line 105 of file DrawPixels.cpp.
friend class DrawPixels [friend] |
Definition at line 75 of file DrawPixels.hpp.
ref<ImagePBO> vl::DrawPixels::Pixels::mImage [protected] |
Definition at line 124 of file DrawPixels.hpp.
Referenced by operator=().
ivec2 vl::DrawPixels::Pixels::mPosition [protected] |
Definition at line 125 of file DrawPixels.hpp.
Referenced by operator=(), and vl::DrawPixels::render_Implementation().
ivec2 vl::DrawPixels::Pixels::mStart [protected] |
Definition at line 126 of file DrawPixels.hpp.
Referenced by operator=(), and vl::DrawPixels::render_Implementation().
ivec2 vl::DrawPixels::Pixels::mSize [protected] |
Definition at line 127 of file DrawPixels.hpp.
Referenced by operator=(), and vl::DrawPixels::render_Implementation().
int vl::DrawPixels::Pixels::mAlign [protected] |
Definition at line 128 of file DrawPixels.hpp.
Referenced by operator=(), and Pixels().