Visualization Library 2.0.0
A 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. More... | |
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);. More... | |
void | deletePixelBufferObject () |
bool | hasPixelBufferObject () const |
Public Member Functions inherited from vl::Object | |
Object () | |
Constructor. More... | |
Object (const Object &other) | |
Copy constructor: copies the name, ref count mutex and user data. More... | |
Object & | operator= (const Object &other) |
Copy operator: copies the object's name, ref count mutex and user data. More... | |
const std::string & | objectName () const |
The name of the object, by default set to the object's class name. More... | |
void | setObjectName (const char *name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setObjectName (const std::string &name) |
The name of the object, by default set to the object's class name in debug builds. More... | |
void | setRefCountMutex (IMutex *mutex) |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
IMutex * | refCountMutex () |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
const IMutex * | refCountMutex () const |
The mutex used to protect the reference counting of an Object across multiple threads. More... | |
int | referenceCount () const |
Returns the number of references of an object. More... | |
void | incReference () const |
Increments the reference count of an object. More... | |
void | decReference () |
Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More... | |
void | setAutomaticDelete (bool autodel_on) |
If set to true the Object is deleted when its reference count reaches 0. More... | |
bool | automaticDelete () const |
If set to true the Object is deleted when its reference count reaches 0. More... | |
template<class T > | |
T * | as () |
Casts an Object to the specified class. More... | |
template<class T > | |
const T * | as () const |
Casts an Object to the specified class. More... | |
Protected Attributes | |
ref< ImagePBO > | mImage |
ivec2 | mPosition |
ivec2 | mStart |
ivec2 | mSize |
int | mAlign |
Protected Attributes inherited from vl::Object | |
std::string | mObjectName |
IMutex * | mRefCountMutex |
int | mReferenceCount |
bool | mAutomaticDelete |
Friends | |
class | DrawPixels |
Additional Inherited Members | |
Protected Member Functions inherited from vl::Object | |
virtual | ~Object () |
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, and mAlign.
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(), mAlign, mImage, mPosition, mSize, mStart, and vl::Image::width().
DrawPixels::Pixels::Pixels | ( | const Pixels & | other | ) |
Definition at line 68 of file DrawPixels.cpp.
DrawPixels::Pixels::~Pixels | ( | ) |
Definition at line 85 of file DrawPixels.cpp.
|
inline |
Definition at line 108 of file DrawPixels.hpp.
Referenced by vl::DrawPixels::render_Implementation().
void DrawPixels::Pixels::deletePixelBufferObject | ( | ) |
Definition at line 89 of file DrawPixels.cpp.
References vl::BufferObject::deleteBufferObject(), image(), and vl::ImagePBO::pixelBufferObject().
bool DrawPixels::Pixels::generatePixelBufferObject | ( | EBufferObjectUsage | usage, |
bool | discard_local_storage | ||
) |
Generates a pixel buffer object for the associated Image calling image()->bufferObject()->setBufferData(usage, discard_local_storage);.
Definition at line 94 of file DrawPixels.cpp.
References vl::Buffer::clear(), image(), vl::Image::imageBuffer(), vl::ImagePBO::pixelBufferObject(), vl::BufferObject::setBufferData(), and VL_CHECK.
bool DrawPixels::Pixels::hasPixelBufferObject | ( | ) | const |
Definition at line 105 of file DrawPixels.cpp.
References vl::BufferObject::handle(), image(), and vl::ImagePBO::pixelBufferObject().
Referenced by vl::DrawPixels::generatePixelBufferObjects().
|
inline |
Definition at line 104 of file DrawPixels.hpp.
Referenced by deletePixelBufferObject(), generatePixelBufferObject(), hasPixelBufferObject(), and vl::DrawPixels::render_Implementation().
|
inline |
Definition at line 106 of file DrawPixels.hpp.
DrawPixels::Pixels & DrawPixels::Pixels::operator= | ( | const Pixels & | other | ) |
|
inline |
Definition at line 92 of file DrawPixels.hpp.
|
inline |
Definition at line 110 of file DrawPixels.hpp.
|
inline |
Definition at line 98 of file DrawPixels.hpp.
|
inline |
Definition at line 102 of file DrawPixels.hpp.
|
inline |
Definition at line 100 of file DrawPixels.hpp.
|
inline |
Definition at line 96 of file DrawPixels.hpp.
|
inline |
Definition at line 94 of file DrawPixels.hpp.
|
friend |
Definition at line 75 of file DrawPixels.hpp.
|
protected |
Definition at line 128 of file DrawPixels.hpp.
Referenced by operator=(), and Pixels().
Definition at line 124 of file DrawPixels.hpp.
Referenced by vl::DrawPixels::generatePixelBufferObjects(), operator=(), Pixels(), and vl::DrawPixels::releaseImages().
|
protected |
Definition at line 125 of file DrawPixels.hpp.
Referenced by operator=(), Pixels(), and vl::DrawPixels::render_Implementation().
|
protected |
Definition at line 127 of file DrawPixels.hpp.
Referenced by operator=(), Pixels(), and vl::DrawPixels::render_Implementation().
|
protected |
Definition at line 126 of file DrawPixels.hpp.
Referenced by operator=(), Pixels(), and vl::DrawPixels::render_Implementation().
Visualization Library 2.0.0 Reference Documentation
Updated on Wed Dec 23 2020 12:44:07.
© Copyright Michele Bosi. All rights reserved.