reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofBaseDraws Class Referenceabstract

#include <ofGraphicsBaseTypes.h>

Inheritance diagram for ofBaseDraws:
ofAbstractImage ofBaseVideoDraws ofFbo ofTexture ofBaseImage_< PixelType > ofBaseImage_< unsigned char > ofBaseImage_< T > ofVideoGrabber ofVideoPlayer ofImage_< PixelType > ofImage_< unsigned char >

Public Member Functions

virtual ~ofBaseDraws ()
 Destroy the abstract object.
 
virtual void draw (float x, float y) const
 Draw at a position at the native size.
 
virtual void draw (float x, float y, float w, float h) const =0
 Draw at a position with the specified size.
 
virtual void draw (const glm::vec2 &point) const
 Draw at a position at the native size.
 
virtual void draw (const ofRectangle &rect) const
 Draw at a position and size specified by a rectangle.
 
virtual void draw (const glm::vec2 &point, float w, float h) const
 Draw at a position.
 
virtual float getHeight () const =0
 Get the height.
 
virtual float getWidth () const =0
 Get the width.
 
virtual void setAnchorPercent (float xPct, float yPct)
 Set the anchor point the item is drawn around as a percentage.
 
virtual void setAnchorPoint (float x, float y)
 Set the anchor point the item is drawn around in pixels.
 
virtual void resetAnchor ()
 Reset the anchor point to (0, 0).
 

Constructor & Destructor Documentation

◆ ~ofBaseDraws()

virtual ofBaseDraws::~ofBaseDraws ( )
inlinevirtual

Destroy the abstract object.

Member Function Documentation

◆ draw() [1/5]

void ofBaseDraws::draw ( const glm::vec2 &  point) const
virtual

Draw at a position at the native size.

Native size is determined by getWidth() and getHeight().

Parameters
pointDraw position.

Reimplemented in ofFbo, ofTexture, ofImage_< PixelType >, ofImage_< unsigned char >, ofVideoGrabber, and ofVideoPlayer.

◆ draw() [2/5]

void ofBaseDraws::draw ( const glm::vec2 &  point,
float  w,
float  h 
) const
virtual

Draw at a position.

Parameters
pointDraw position.
wDraw width.
hDraw height.

Reimplemented in ofFbo, ofTexture, ofImage_< PixelType >, ofImage_< unsigned char >, ofVideoGrabber, and ofVideoPlayer.

◆ draw() [3/5]

void ofBaseDraws::draw ( const ofRectangle rect) const
virtual

Draw at a position and size specified by a rectangle.

Parameters
rectDraw position and size.

Reimplemented in ofFbo, ofTexture, ofImage_< PixelType >, ofImage_< unsigned char >, ofVideoGrabber, and ofVideoPlayer.

◆ draw() [4/5]

virtual void ofBaseDraws::draw ( float  x,
float  y 
) const
inlinevirtual

Draw at a position at the native size.

Native size is determined by getWidth() and getHeight().

Parameters
xDraw position on the x axis.
yDraw position on the y axis.

Reimplemented in ofFbo, ofFbo, ofTexture, ofTexture, ofImage_< PixelType >, ofImage_< unsigned char >, ofImage_< PixelType >, ofImage_< unsigned char >, ofVideoGrabber, ofVideoGrabber, ofVideoPlayer, and ofVideoPlayer.

◆ draw() [5/5]

virtual void ofBaseDraws::draw ( float  x,
float  y,
float  w,
float  h 
) const
pure virtual

Draw at a position with the specified size.

Parameters
xDraw position on the x axis.
yDraw position on the y axis.
wDraw width.
hDraw height.

Implemented in ofTexture, ofImage_< PixelType >, ofImage_< unsigned char >, ofVideoGrabber, ofVideoPlayer, ofImage_< unsigned char >, ofFbo, ofTexture, ofImage_< PixelType >, ofVideoGrabber, ofVideoPlayer, and ofFbo.

◆ getHeight()

virtual float ofBaseDraws::getHeight ( ) const
pure virtual

Get the height.

Returns
the height.

Implemented in ofFbo, ofTexture, ofImage_< PixelType >, ofImage_< unsigned char >, ofVideoGrabber, and ofVideoPlayer.

◆ getWidth()

virtual float ofBaseDraws::getWidth ( ) const
pure virtual

Get the width.

Returns
the width.

Implemented in ofFbo, ofTexture, ofImage_< PixelType >, ofImage_< unsigned char >, ofVideoGrabber, and ofVideoPlayer.

◆ resetAnchor()

virtual void ofBaseDraws::resetAnchor ( )
inlinevirtual

Reset the anchor point to (0, 0).

Reimplemented in ofFbo, ofTexture, ofImage_< PixelType >, ofImage_< unsigned char >, ofVideoGrabber, and ofVideoPlayer.

◆ setAnchorPercent()

virtual void ofBaseDraws::setAnchorPercent ( float  xPct,
float  yPct 
)
inlinevirtual

Set the anchor point the item is drawn around as a percentage.

This can be useful if you want to rotate an image around a particular point.

Parameters
xPctHorizontal position as a percentage (0 - 1).
yPctVertical position as a percentage (0 - 1).

Reimplemented in ofFbo, ofTexture, ofImage_< PixelType >, ofImage_< unsigned char >, ofVideoGrabber, and ofVideoPlayer.

◆ setAnchorPoint()

virtual void ofBaseDraws::setAnchorPoint ( float  x,
float  y 
)
inlinevirtual

Set the anchor point the item is drawn around in pixels.

This can be useful if you want to rotate an image around a particular point.

Parameters
xHorizontal texture position in pixels.
yVertical texture position in pixels.

Reimplemented in ofFbo, ofTexture, ofImage_< PixelType >, ofImage_< unsigned char >, ofVideoGrabber, and ofVideoPlayer.


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