My Project
Static Public Member Functions | Static Protected Attributes | List of all members
ParaScripting::ParaPainter Class Reference

the current painter object. More...

#include <ParaScriptingPainter.h>

Static Public Member Functions

static bool Begin (const object &paintDevice)
 
static void End ()
 
static void Flush ()
 
static void Save ()
 
static void Restore ()
 
static void SetCompositionMode (int mode)
 
static int GetCompositionMode ()
 
static const ParaAttributeObjectGetAttributeObject ()
 
static void CallField (const char *sFieldname)
 
static void SetField (const char *sFieldname, const object &input)
 
static object GetField (const char *sFieldname, const object &output)
 
static void SetFont (const object &font)
 set current font More...
 
static void SetPen (const object &pen)
 set current pen More...
 
static void SetBrush (const object &brush)
 set current brush (texture and color) More...
 
static void SetBrushOrigin (float x, float y)
 
static void SetBackground (const object &brush)
 set current background brush More...
 
static void SetOpacity (float fOpacity)
 between [0,1]
 
static void SetClipRegion (int x, int y, int w, int h)
 
static void SetClipping (bool enable)
 
static bool HasClipping ()
 
static void SetTransform (const object &trans, bool combine)
 Sets the world transformation matrix. More...
 
static luabind::object GetTransform (const luabind::object &out)
 
static void Scale (float sx, float sy)
 
static void Shear (float sh, float sv)
 
static void Rotate (float a)
 
static void Translate (float dx, float dy)
 
static void DrawPoint (float x, float y)
 
static void DrawLine (float x1, float y1, float x2, float y2)
 
static void DrawRect (float x1, float y1, float w, float h)
 
static void DrawTriangleList (const object &triangleList, int nTriangleCount, int nIndexOffset)
 draw 3d triangles More...
 
static void DrawLineList (const object &lineList, int nLineCount, int nIndexOffset)
 draw 3d lines More...
 
static void DrawTexture (int x, int y, int w, int h, const object &pTexture)
 
static void DrawTexture2 (int x, int y, int w, int h, const object &pTexture, int sx, int sy, int sw, int sh)
 
static void DrawText (float x, float y, const std::string &s)
 
static void DrawText2 (float x, float y, float w, float h, const std::string &s, int textOption)
 
static void DrawSceneObject (ParaObject &obj, int nOption)
 draw a scene object More...
 
static CPainterGetPainter ()
 
static void SetPainter (CPainter *val)
 

Static Protected Attributes

static CPainterm_pPainter = NULL
 

Detailed Description

the current painter object.

call Begin() End() to switch paint device. please note, for ownerdraw GUI callbacks, they are automatically called.

for performance reasons, all methods are static.

Member Function Documentation

§ DrawLineList()

void ParaScripting::ParaPainter::DrawLineList ( const object lineList,
int  nLineCount,
int  nIndexOffset 
)
static

draw 3d lines

Parameters
lineListarray of line vertices {{x,y,z}, {x,y,z}, ...},
nTriangleCounttriangle count
nIndexOffsetstart index offset. default to 0.

§ DrawSceneObject()

void ParaScripting::ParaPainter::DrawSceneObject ( ParaObject obj,
int  nOption 
)
static

draw a scene object

Parameters
objcan be a character or model object.
nOptiondefault to 0, which renders using the transform of the scene object.

§ DrawTriangleList()

void ParaScripting::ParaPainter::DrawTriangleList ( const object triangleList,
int  nTriangleCount,
int  nIndexOffset 
)
static

draw 3d triangles

Parameters
triangleListarray of triangle vertices {{x,y,z}, {x,y,z}, {x,y,z}, ...},
nTriangleCounttriangle count.
nIndexOffsetstart index offset. default to 0.

§ SetBackground()

void ParaScripting::ParaPainter::SetBackground ( const object brush)
static

set current background brush

Parameters
brush{ color="#00000000", texture="filename or texture asset"}

§ SetBrush()

void ParaScripting::ParaPainter::SetBrush ( const object brush)
static

set current brush (texture and color)

Parameters
brush{ color="#00000000", texture="filename or texture asset"} or it can be pen color "#ff000000" or "255 255 255"

§ SetFont()

void ParaScripting::ParaPainter::SetFont ( const object font)
static

set current font

Parameters
font{family="System", size=10, bold=true} or it can be string "System;14;" or "System;14;bold"

§ SetPen()

void ParaScripting::ParaPainter::SetPen ( const object pen)
static

set current pen

Parameters
pen{ width=1, brush = {color="#00000000", texture="filename or texture asset"}, } or it can be {width=1, color="#000000", texture="filename or texture asset"} or it can be pen color "#ff000000" or "255 255 255"

§ SetTransform()

void ParaScripting::ParaPainter::SetTransform ( const object trans,
bool  combine 
)
static

Sets the world transformation matrix.

If combine is true, the specified matrix is combined with the current matrix; otherwise it replaces the current matrix.


The documentation for this class was generated from the following files: