Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics
[Home] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | Friends

vl::DrawPixels::Pixels Class Reference

Represents a bitmap to be drawn on the screen. More...

#include <DrawPixels.hpp>

Inheritance diagram for vl::DrawPixels::Pixels:
vl::Object

List of all members.

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)
Pixelsoperator= (const Pixels &other)
 ~Pixels ()
virtual const char * className ()
 Returns the name of the class.
const ivec2position () const
const ivec2start () const
const ivec2size () const
void setPosition (const ivec2 &position)
void setStart (const ivec2 &start)
void setSize (const ivec2 &size)
Imageimage ()
const Imageimage () 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< ImagemImage
ivec2 mPosition
ivec2 mStart
ivec2 mSize
int mAlign

Friends

class DrawPixels

Detailed Description

Represents a bitmap to be drawn on the screen.


Constructor & Destructor Documentation

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 (  )

Member Function Documentation

DrawPixels::Pixels & DrawPixels::Pixels::operator= ( const Pixels other )
virtual const char* vl::DrawPixels::Pixels::className (  ) [inline, virtual]

Returns the name of the class.

Reimplemented from vl::Object.

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 
)

Generates a pixel buffer object for the associated Image calling image()->gpuBuffer()->setBufferData(usage, discard_local_storage);.

Note:
All the Pixels object sharing the same Image will use the Image's PBO
void DrawPixels::Pixels::deletePixelBufferObject (  )
bool DrawPixels::Pixels::hasPixelBufferObject (  ) const

Friends And Related Function Documentation

friend class DrawPixels [friend]

Member Data Documentation


The documentation for this class was generated from the following files:

Visualization Library v2010.11.1123 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Thu Nov 18 2010 02:08:00.
Permission is granted to use this page to write and publish articles regarding Visualization Library.