ofDocsdocumentation types ofBaseDraws

ofBaseDraws


draw( ... )

void draw(const glm::vec2 &point)

Draw at a position at the native size.

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

Parameters:

point Draw position.


draw( ... )

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

Draw at a position.

Parameters:

point Draw position.

w Draw width.

h Draw height.


draw( ... )

void draw(const ofRectangle &rect)

Draw at a position and size specified by a rectangle.

Parameters:

rect Draw position and size.


draw( ... )

void draw(float x, float y)

Draw at a position at the native size.

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

Parameters:

x Draw position on the x axis.

y Draw position on the y axis.


draw( ... )

void draw(float x, float y, float w, float h)

Draw at a position with the specified size.

Parameters:

x Draw position on the x axis.

y Draw position on the y axis.

w Draw width.

h Draw height.


getHeight( )

float getHeight()

Get the height.

Returns: the height.


getWidth( )

float getWidth()

Get the width.

Returns: the width.


resetAnchor( )

void resetAnchor()

Reset the anchor point to (0, 0).


setAnchorPercent( ... )

void setAnchorPercent(float xPct, float yPct)

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:

xPct Horizontal position as a percentage (0 - 1).

yPct Vertical position as a percentage (0 - 1).


setAnchorPoint( ... )

void setAnchorPoint(float x, float y)

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:

x Horizontal texture position in pixels.

y Vertical texture position in pixels.


~ofBaseDraws( )

~ofBaseDraws()

Destroy the abstract object.