Public Member Functions | Public Attributes

Tiny2D::Rect Struct Reference

Rectangle representation. More...

#include <Tiny2D_Base.h>

List of all members.

Public Member Functions

 Rect (float left=0.0f, float top=0.0f, float width=100.0f, float height=100.0f)
 Constructs rectangle.
void Set (float left, float top, float width, float height)
 Sets up rectangle.
float Right () const
 Gets right rectangle coordinate.
float Bottom () const
 Gets bottom rectangle coordinate.
bool Intersect (float x, float y) const
 Tests whether rectangle intersects with point at given coordinates.
void Translate (float x, float y)
 Moves rectangle by given x,y amount.
void ScaleCentered (float scale)
 Scales rectangle while preserving its center coordinates.

Public Attributes

float left
 Left coordinate.
float top
 Top coordinate.
float width
 Width.
float height
 Height.

Detailed Description

Rectangle representation.


Constructor & Destructor Documentation

Tiny2D::Rect::Rect ( float  left = 0.0f,
float  top = 0.0f,
float  width = 100.0f,
float  height = 100.0f 
) [inline]

Constructs rectangle.


Member Function Documentation

float Tiny2D::Rect::Bottom (  ) const [inline]

Gets bottom rectangle coordinate.

bool Tiny2D::Rect::Intersect ( float  x,
float  y 
) const [inline]

Tests whether rectangle intersects with point at given coordinates.

float Tiny2D::Rect::Right (  ) const [inline]

Gets right rectangle coordinate.

void Tiny2D::Rect::ScaleCentered ( float  scale ) [inline]

Scales rectangle while preserving its center coordinates.

void Tiny2D::Rect::Set ( float  left,
float  top,
float  width,
float  height 
) [inline]

Sets up rectangle.

void Tiny2D::Rect::Translate ( float  x,
float  y 
) [inline]

Moves rectangle by given x,y amount.


Member Data Documentation

Height.

Left coordinate.

Top coordinate.

Width.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines