libpgf  6.11.42
PGF - Progressive Graphics File
PGFRect Struct Reference

Rectangle. More...

#include <PGFtypes.h>

List of all members.

Public Member Functions

 PGFRect ()
 Standard constructor.
 PGFRect (UINT32 x, UINT32 y, UINT32 width, UINT32 height)
UINT32 Width () const
UINT32 Height () const
bool IsInside (UINT32 x, UINT32 y) const

Public Attributes

UINT32 left
UINT32 top
UINT32 right
UINT32 bottom

Detailed Description

Rectangle.

Rectangle

Author:
C. Stamm

Definition at line 195 of file PGFtypes.h.


Constructor & Destructor Documentation

PGFRect::PGFRect ( ) [inline]

Standard constructor.

Definition at line 197 of file PGFtypes.h.

: left(0), top(0), right(0), bottom(0) {}
PGFRect::PGFRect ( UINT32  x,
UINT32  y,
UINT32  width,
UINT32  height 
) [inline]

Constructor

Parameters:
xLeft offset
yTop offset
widthRectangle width
heightRectangle height

Definition at line 203 of file PGFtypes.h.

: left(x), top(y), right(x + width), bottom(y + height) {}

Member Function Documentation

UINT32 PGFRect::Height ( ) const [inline]
Returns:
Rectangle height

Definition at line 208 of file PGFtypes.h.

{ return bottom - top; }
bool PGFRect::IsInside ( UINT32  x,
UINT32  y 
) const [inline]

Test if point (x,y) is inside this rectangle

Parameters:
xPoint coordinate x
yPoint coordinate y
Returns:
True if point (x,y) is inside this rectangle

Definition at line 214 of file PGFtypes.h.

{ return (x >= left && x < right && y >= top && y < bottom); }
UINT32 PGFRect::Width ( ) const [inline]
Returns:
Rectangle width

Definition at line 206 of file PGFtypes.h.

{ return right - left; }

Member Data Documentation

Definition at line 216 of file PGFtypes.h.

UINT32 PGFRect::left

Definition at line 216 of file PGFtypes.h.

Definition at line 216 of file PGFtypes.h.

UINT32 PGFRect::top

Definition at line 216 of file PGFtypes.h.


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