Pixel Dust Game Engine  v0.9.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Public Member Functions | List of all members
Port Class Reference

Public Member Functions

Rect getDrawingArea ()
 
Rect getClipRect ()
 
void setClipRect (const Rect &rect)
 
void fillRect (const Rect &r, Color rgba=PDG_BLACK_COLOR)
 you can also pass in a RotatedRect instead of a Quad, since the conversion is automatic
 
void fillRect (const RotatedRect &rr, Color rgba=PDG_BLACK_COLOR)
 
void fillRect (const Quad &quad, Color rgba=PDG_BLACK_COLOR)
 
void frameRect (const Rect &r, Color rgba=PDG_BLACK_COLOR)
 
void frameRect (const RotatedRect &rr, Color rgba=PDG_BLACK_COLOR)
 
void frameRect (const Quad &quad, Color rgba=PDG_BLACK_COLOR)
 
void drawLine (const Point &from, const Point &to, Color rgba=PDG_BLACK_COLOR)
 
void frameOval (const Point &centerPt, float xRadius, float yRadius, Color rgba=PDG_BLACK_COLOR)
 
void fillOval (const Point &centerPt, float xRadius, float yRadius, Color rgba=PDG_BLACK_COLOR)
 
void frameCircle (const Point &centerPt, float radius, Color rgba=PDG_BLACK_COLOR)
 
void fillCircle (const Point &centerPt, float radius, Color rgba=PDG_BLACK_COLOR)
 
void frameRoundRect (const Rect &rect, float radius, Color rgba=PDG_BLACK_COLOR)
 
void fillRoundRect (const Rect &rect, float radius, Color rgba=PDG_BLACK_COLOR)
 
void fillRectEx (const Rect &r, uint32 pattern, uint8 patternShift, Color rgba)
 you can also pass in a Rect or a RotatedRect instead of a Quad, since the conversion is automatic
 
void fillRectEx (const RotatedRect &rr, uint32 pattern, uint8 patternShift, Color rgba)
 
void fillRectEx (const Quad &quad, uint32 pattern, uint8 patternShift, Color rgba)
 
void frameRectEx (const Rect &r, uint8 thickness, uint32 pattern, uint8 patternShift, Color rgba)
 
void frameRectEx (const RotatedRect &rr, uint8 thickness, uint32 pattern, uint8 patternShift, Color rgba)
 
void frameRectEx (const Quad &quad, uint8 thickness, uint32 pattern, uint8 patternShift, Color rgba)
 
void drawLineEx (const Point &from, const Point &to, uint8 thickness, uint32 pattern, uint8 patternShift, Color rgba)
 
void fillRectWithGradient (const Rect &r, Color startColor, Color endColor)
 you can also pass in a Rect or a RotatedRect instead of a Quad, since the conversion is automatic
 
void fillRectWithGradient (const RotatedRect &rr, Color startColor, Color endColor)
 
void fillRectWithGradient (const Quad &quad, Color startColor, Color endColor)
 
void drawImage (Image *img, const Point &loc)
 draws image at given location
 
void drawImage (Image *img, const Rect &r)
 draws image into a given rectangle, scaling as needed
 
void drawImage (Image *img, const Rect &r, Image::FitType fitType, bool clipOverflow=false)
 draws image into a given rectangle, scaling as specified to fit, with optional clipping
 
void drawImage (Image *img, const RotatedRect &rr)
 draws image at given location, scaling if necessary to fit
 
void drawImage (Image *img, const Quad &quad)
 draws image into a given quad-polygon, mapping each of the corners to the corresponding points
 
void drawImage (ImageStrip *img, int frame, const Point &loc)
 draws single frame of multiframe image at given location
 
void drawImage (ImageStrip *img, int frame, const Rect &r)
 draws single frame of multiframe image into a given rectangle, scaling as needed
 
void drawImage (ImageStrip *img, int frame, const Rect &r, Image::FitType fitType, bool clipOverflow=false)
 draws single frame of multiframe image into a given rectangle, scaling as specified to fit, with optional clipping
 
void drawImage (ImageStrip *img, int frame, const RotatedRect &rr)
 draws single frame of multiframe image at given location, scaling if necessary to fit
 
void drawImage (ImageStrip *img, int frame, const Quad &quad)
 draws single frame of multiframe image into a given quad-polygon, mapping each of the corners to the corresponding points
 
void drawTexture (Image *img, const Rect &r)
 draws image as texture filling given area, replicating as needed to fill entire area
 
void drawTexture (ImageStrip *img, int frame, const Rect &r)
 draws single frame of multiframe image as texture filling given area, replicating as needed to fill entire area
 
void drawTexturedSphere (Image *img, const Point &loc, float radius, float rotation=0.0f, const Offset &polarOffsetRadians=Offset(0, 0), const Offset &lightOffsetRadians=Offset(0, 0))
 draws image as texture wrapped around a sphere
 
void drawTexturedSphere (ImageStrip *img, int frame, const Point &loc, float radius, float rotation=0.0f, const Offset &polarOffsetRadians=Offset(0, 0), const Offset &lightOffsetRadians=Offset(0, 0))
 draws single frame of multiframe image as texture wrapped around a sphere
 
void drawText (const char *text, const Point &loc, int size, uint32 style=Graphics::textStyle_Plain, Color rgba=PDG_BLACK_COLOR)
 
void drawText (const char *text, const Rect &r, int size, uint32 style=Graphics::textStyle_Plain, Color rgba=PDG_BLACK_COLOR)
 
void drawText (const char *text, const RotatedRect &rr, int size, uint32 style=Graphics::textStyle_Plain, Color rgba=PDG_BLACK_COLOR)
 
void drawText (const char *text, const Quad &quad, int size, uint32 style=Graphics::textStyle_Plain, Color rgba=PDG_BLACK_COLOR)
 
int getTextWidth (const char *text, int size, uint32 style=Graphics::textStyle_Plain, int len=-1)
 
FontgetCurrentFont (uint32 style=Graphics::textStyle_Plain)
 
void setFont (Font *font=0)
 
void setFontForStyle (Font *font, uint32 style)
 
void setFontScalingFactor (float scaleBy)
 
int startTrackingMouse (const Rect &rect, void *userData=0)
 
void stopTrackingMouse (int trackingRef)
 
void setCursor (Image *cursorImage, const Point &hotSpot)
 
ImagegetCursor ()
 
void resetCursor ()
 

Detailed Description

Port An area in which drawing is done, a viewport. This could be a full screen drawing context or a window.

Member Function Documentation

void drawImage ( Image img,
const Point loc 
)

draws image at given location

void drawImage ( Image img,
const Rect r 
)
inline

draws image into a given rectangle, scaling as needed

void drawImage ( Image img,
const Rect r,
Image::FitType  fitType,
bool  clipOverflow = false 
)

draws image into a given rectangle, scaling as specified to fit, with optional clipping

void drawImage ( Image img,
const RotatedRect rr 
)
inline

draws image at given location, scaling if necessary to fit

void drawImage ( Image img,
const Quad quad 
)

draws image into a given quad-polygon, mapping each of the corners to the corresponding points

void drawImage ( ImageStrip img,
int  frame,
const Point loc 
)

draws single frame of multiframe image at given location

void drawImage ( ImageStrip img,
int  frame,
const Rect r 
)
inline

draws single frame of multiframe image into a given rectangle, scaling as needed

void drawImage ( ImageStrip img,
int  frame,
const Rect r,
Image::FitType  fitType,
bool  clipOverflow = false 
)

draws single frame of multiframe image into a given rectangle, scaling as specified to fit, with optional clipping

void drawImage ( ImageStrip img,
int  frame,
const RotatedRect rr 
)
inline

draws single frame of multiframe image at given location, scaling if necessary to fit

void drawImage ( ImageStrip img,
int  frame,
const Quad quad 
)

draws single frame of multiframe image into a given quad-polygon, mapping each of the corners to the corresponding points

void drawLine ( const Point from,
const Point to,
Color  rgba = PDG_BLACK_COLOR 
)
void drawLineEx ( const Point from,
const Point to,
uint8  thickness,
uint32  pattern,
uint8  patternShift,
Color  rgba 
)
void drawText ( const char *  text,
const Point loc,
int  size,
uint32  style = Graphics::textStyle_Plain,
Color  rgba = PDG_BLACK_COLOR 
)
void drawText ( const char *  text,
const Rect r,
int  size,
uint32  style = Graphics::textStyle_Plain,
Color  rgba = PDG_BLACK_COLOR 
)
inline
void drawText ( const char *  text,
const RotatedRect rr,
int  size,
uint32  style = Graphics::textStyle_Plain,
Color  rgba = PDG_BLACK_COLOR 
)
inline
void drawText ( const char *  text,
const Quad quad,
int  size,
uint32  style = Graphics::textStyle_Plain,
Color  rgba = PDG_BLACK_COLOR 
)
void drawTexture ( Image img,
const Rect r 
)

draws image as texture filling given area, replicating as needed to fill entire area

void drawTexture ( ImageStrip img,
int  frame,
const Rect r 
)

draws single frame of multiframe image as texture filling given area, replicating as needed to fill entire area

void drawTexturedSphere ( Image img,
const Point loc,
float  radius,
float  rotation = 0.0f,
const Offset polarOffsetRadians = Offset(0, 0),
const Offset lightOffsetRadians = Offset(0, 0) 
)

draws image as texture wrapped around a sphere

void drawTexturedSphere ( ImageStrip img,
int  frame,
const Point loc,
float  radius,
float  rotation = 0.0f,
const Offset polarOffsetRadians = Offset(0, 0),
const Offset lightOffsetRadians = Offset(0, 0) 
)

draws single frame of multiframe image as texture wrapped around a sphere

void fillCircle ( const Point centerPt,
float  radius,
Color  rgba = PDG_BLACK_COLOR 
)
void fillOval ( const Point centerPt,
float  xRadius,
float  yRadius,
Color  rgba = PDG_BLACK_COLOR 
)
void fillRect ( const Rect r,
Color  rgba = PDG_BLACK_COLOR 
)
inline

you can also pass in a RotatedRect instead of a Quad, since the conversion is automatic

void fillRect ( const RotatedRect rr,
Color  rgba = PDG_BLACK_COLOR 
)
inline
void fillRect ( const Quad quad,
Color  rgba = PDG_BLACK_COLOR 
)
void fillRectEx ( const Rect r,
uint32  pattern,
uint8  patternShift,
Color  rgba 
)
inline

you can also pass in a Rect or a RotatedRect instead of a Quad, since the conversion is automatic

void fillRectEx ( const RotatedRect rr,
uint32  pattern,
uint8  patternShift,
Color  rgba 
)
inline
void fillRectEx ( const Quad quad,
uint32  pattern,
uint8  patternShift,
Color  rgba 
)
void fillRectWithGradient ( const Rect r,
Color  startColor,
Color  endColor 
)
inline

you can also pass in a Rect or a RotatedRect instead of a Quad, since the conversion is automatic

void fillRectWithGradient ( const RotatedRect rr,
Color  startColor,
Color  endColor 
)
inline
void fillRectWithGradient ( const Quad quad,
Color  startColor,
Color  endColor 
)
void fillRoundRect ( const Rect rect,
float  radius,
Color  rgba = PDG_BLACK_COLOR 
)
void frameCircle ( const Point centerPt,
float  radius,
Color  rgba = PDG_BLACK_COLOR 
)
void frameOval ( const Point centerPt,
float  xRadius,
float  yRadius,
Color  rgba = PDG_BLACK_COLOR 
)
void frameRect ( const Rect r,
Color  rgba = PDG_BLACK_COLOR 
)
inline
void frameRect ( const RotatedRect rr,
Color  rgba = PDG_BLACK_COLOR 
)
inline
void frameRect ( const Quad quad,
Color  rgba = PDG_BLACK_COLOR 
)
void frameRectEx ( const Rect r,
uint8  thickness,
uint32  pattern,
uint8  patternShift,
Color  rgba 
)
inline
void frameRectEx ( const RotatedRect rr,
uint8  thickness,
uint32  pattern,
uint8  patternShift,
Color  rgba 
)
inline
void frameRectEx ( const Quad quad,
uint8  thickness,
uint32  pattern,
uint8  patternShift,
Color  rgba 
)
void frameRoundRect ( const Rect rect,
float  radius,
Color  rgba = PDG_BLACK_COLOR 
)
Rect getClipRect ( )
Font* getCurrentFont ( uint32  style = Graphics::textStyle_Plain)
Image* getCursor ( )
Rect getDrawingArea ( )
int getTextWidth ( const char *  text,
int  size,
uint32  style = Graphics::textStyle_Plain,
int  len = -1 
)
void resetCursor ( )
void setClipRect ( const Rect rect)
void setCursor ( Image cursorImage,
const Point hotSpot 
)
void setFont ( Font font = 0)
void setFontForStyle ( Font font,
uint32  style 
)
void setFontScalingFactor ( float  scaleBy)
int startTrackingMouse ( const Rect rect,
void *  userData = 0 
)
void stopTrackingMouse ( int  trackingRef)