PDG engine v0.9.5
 All Classes Namespaces Functions Variables Groups Pages
Public Member Functions | List of all members
Port Class Reference

area in which drawing is done, a viewport (GUI Only) More...

Public Member Functions

 drawImage (Image img, Point loc)
 
 drawImage (Image img, Quad quad)
 
 drawImage (Image img, Rect rect, int fitType=fit_Fill, boolean clipOverflow=false)
 
 drawLine (Point from, Point to, Color rgba="black")
 
 drawLineEx (Point from, Point to, uint thickness, uint pattern, uint patternShift, Color rgba)
 
 drawText (string text, Point location, int size, uint style=textStyle_Plain, Color rgba= 'black')
 
 drawText (string text, Quad quad, int size, uint style=textStyle_Plain, Color rgba= 'black')
 
 drawText (string text, Rect rect, int size, uint style=textStyle_Plain, Color rgba= 'black')
 
 drawTexture (Image img, Rect r)
 
 drawTexturedSphere (Image img, Point loc, number radius, number rotation=0, Offset polarOffsetRadians=Offset(0, 0), Offset lightOffsetRadians=Offset(0, 0))
 
 drawTexturedSphere (ImageStrip imgStrip, int frameNum, Point loc, number radius, number rotation=0, Offset polarOffsetRadians=Offset(0, 0), Offset lightOffsetRadians=Offset(0, 0))
 
 fillCircle (Point centerPt, number radius, Color rgba="black")
 
 fillOval (Point centerPt, number xRadius, number yRadius, Color rgba="black")
 
 fillRect (Quad quad, Color rgba="black")
 
 fillRect (Rect quad, Color rgba="black")
 
 fillRectEx (Quad quad, uint pattern, uint patternShift, Color rgba)
 
 fillRectEx (Rect quad, uint pattern, uint patternShift, Color rgba)
 
 fillRectWithGradient (Quad quad, Color startColor, Color endColor)
 
 fillRectWithGradient (Rect quad, Color startColor, Color endColor)
 
 fillRoundRect (Rect rect, number radius, Color rgba="black")
 
 frameCircle (Point centerPt, number radius, Color rgba="black")
 
 frameOval (Point centerPt, number xRadius, number yRadius, Color rgba="black")
 
 frameRect (Quad quad, Color rgba="black")
 
 frameRect (Rect quad, Color rgba="black")
 
 frameRectEx (Quad quad, uint thickness, uint pattern, uint patternShift, Color rgba)
 
 frameRectEx (Rect quad, uint thickness, uint pattern, uint patternShift, Color rgba)
 
 frameRoundRect (Rect rect, number radius, Color rgba="black")
 
Rect getClipRect ()
 
Font getCurrentFont (uint style=textStyle_Plain)
 
Image getCursor ()
 get the Image that is being used as the cursor NOT IMPLEMENTED More...
 
Rect getDrawingArea ()
 
number getTextWidth (string text, int size, uint style=textStyle_Plain, int len=-1)
 
 resetCursor ()
 NOT IMPLEMENTED. More...
 
Port setClipRect (Rect inClipRect)
 
 setCursor (Image cursorImage, Point hotSpot)
 NOT IMPLEMENTED. More...
 
 setFont (Font font=DEFAULT_FONT)
 
 setFontForStyle (uint style, Font font=DEFAULT_FONT)
 
 setFontScalingFactor (number scaleBy)
 
number startTrackingMouse (Rect rect)
 NOT IMPLEMENTED. More...
 
 stopTrackingMouse (int trackingRef)
 NOT IMPLEMENTED. More...
 

Detailed Description

area in which drawing is done, a viewport (GUI Only)

Note
API Stability: 2 - Unstable. The API is in the process of settling, but has not yet had sufficient real-world testing to be considered stable. Backwards-compatibility will be maintained if reasonable.

A Port can be a full screen drawing context or a window.

Member Function Documentation

drawImage ( Image  img,
Point  loc 
)
drawImage ( Image  img,
Quad  quad 
)
drawImage ( Image  img,
Rect  rect,
int  fitType = fit_Fill,
boolean  clipOverflow = false 
)
drawLine ( Point  from,
Point  to,
Color  rgba = "black" 
)
drawLineEx ( Point  from,
Point  to,
uint  thickness,
uint  pattern,
uint  patternShift,
Color  rgba 
)
drawText ( string  text,
Point  location,
int  size,
uint  style = textStyle_Plain,
Color  rgba = 'black' 
)
drawText ( string  text,
Quad  quad,
int  size,
uint  style = textStyle_Plain,
Color  rgba = 'black' 
)
drawText ( string  text,
Rect  rect,
int  size,
uint  style = textStyle_Plain,
Color  rgba = 'black' 
)
drawTexture ( Image  img,
Rect  r 
)
drawTexturedSphere ( Image  img,
Point  loc,
number  radius,
number  rotation = 0,
Offset  polarOffsetRadians = Offset(0, 0),
Offset  lightOffsetRadians = Offset(0, 0) 
)
drawTexturedSphere ( ImageStrip  imgStrip,
int  frameNum,
Point  loc,
number  radius,
number  rotation = 0,
Offset  polarOffsetRadians = Offset(0, 0),
Offset  lightOffsetRadians = Offset(0, 0) 
)
fillCircle ( Point  centerPt,
number  radius,
Color  rgba = "black" 
)
fillOval ( Point  centerPt,
number  xRadius,
number  yRadius,
Color  rgba = "black" 
)
fillRect ( Quad  quad,
Color  rgba = "black" 
)
fillRect ( Rect  quad,
Color  rgba = "black" 
)
fillRectEx ( Quad  quad,
uint  pattern,
uint  patternShift,
Color  rgba 
)
fillRectEx ( Rect  quad,
uint  pattern,
uint  patternShift,
Color  rgba 
)
fillRectWithGradient ( Quad  quad,
Color  startColor,
Color  endColor 
)
fillRectWithGradient ( Rect  quad,
Color  startColor,
Color  endColor 
)
fillRoundRect ( Rect  rect,
number  radius,
Color  rgba = "black" 
)
frameCircle ( Point  centerPt,
number  radius,
Color  rgba = "black" 
)
frameOval ( Point  centerPt,
number  xRadius,
number  yRadius,
Color  rgba = "black" 
)
frameRect ( Quad  quad,
Color  rgba = "black" 
)
frameRect ( Rect  quad,
Color  rgba = "black" 
)
frameRectEx ( Quad  quad,
uint  thickness,
uint  pattern,
uint  patternShift,
Color  rgba 
)
frameRectEx ( Rect  quad,
uint  thickness,
uint  pattern,
uint  patternShift,
Color  rgba 
)
frameRoundRect ( Rect  rect,
number  radius,
Color  rgba = "black" 
)
Rect getClipRect ( )
Font getCurrentFont ( uint  style = textStyle_Plain)
getCursor ( )

get the Image that is being used as the cursor NOT IMPLEMENTED

Todo:
NOT IMPLEMENTED
Rect getDrawingArea ( )
number getTextWidth ( string  text,
int  size,
uint  style = textStyle_Plain,
int  len = -1 
)
resetCursor ( )

NOT IMPLEMENTED.

Todo:
NOT IMPLEMENTED
Port setClipRect ( Rect  inClipRect)
setCursor ( Image  cursorImage,
Point  hotSpot 
)

NOT IMPLEMENTED.

Todo:
NOT IMPLEMENTED
setFont ( Font  font = DEFAULT_FONT)
setFontForStyle ( uint  style,
Font  font = DEFAULT_FONT 
)
setFontScalingFactor ( number  scaleBy)
startTrackingMouse ( Rect  rect)

NOT IMPLEMENTED.

Todo:
NOT IMPLEMENTED
stopTrackingMouse ( int  trackingRef)

NOT IMPLEMENTED.

Todo:
NOT IMPLEMENTED

User Comments