Ogre::Canvas::Context Class Reference

List of all members.

Public Member Functions

 Context (unsigned int _width, unsigned int _height, bool _enableAlpha=true)
void save ()
void restore ()
void reset ()
void scale (float x, float y)
void scale (const Ogre::Vector2 &scaling)
void rotate (float radian)
void rotate (const Ogre::Radian &angle)
void translate (float x, float y)
void translate (const Ogre::Vector2 &translation)
void transform (float m11, float m12, float m21, float m22, float dx, float dy)
void transform (const Ogre::Matrix3 &transform)
void setTransform (float m11, float m12, float m21, float m22, float dx, float dy)
void setTransform (const Ogre::Matrix3 &transform)
void drawImage (const Ogre::Image &image, float dstX, float dstY, float dstWidth=0, float dstHeight=0)
void drawImage (const Ogre::Image &image, const Ogre::Vector2 &pos, const Ogre::Vector2 &dim=Ogre::Vector2::ZERO)
void drawImage (const Ogre::Image &image, float srcX, float srcY, float srcWidth, float srcHeight, float dstX, float dstY, float dstWidth, float dstHeight)
void drawImage (const Ogre::Image &image, const Ogre::Vector2 &srcPos, const Ogre::Vector2 &srcDim, const Ogre::Vector2 &dstPos, const Ogre::Vector2 &dstDim)
void globalAlpha (float alpha)
float globalAlpha ()
void globalCompositeOperation (DrawingOperator op)
DrawingOperator globalCompositeOperation ()
void lineWidth (float width)
float lineWidth ()
void lineCap (LineCap lineCap)
LineCap lineCap ()
void lineJoin (LineJoin lineJoin)
LineJoin lineJoin ()
void miterLimit (float limit)
float miterLimit ()
void lineDash (LineDash lineDash)
LineDash lineDash ()
void strokeStyle (Ogre::ColourValue color)
void strokeStyle (Gradient *gradient)
void strokeStyle (Pattern *pattern)
void fillStyle (Ogre::ColourValue color)
void fillStyle (Gradient *gradient)
void fillStyle (Pattern *pattern)
void shadowOffsetX (float x)
void shadowOffsetY (float y)
void shadowBlur (float blur)
void shadowColor (Ogre::ColourValue color)
GradientcreateLinearGradient (float x0, float y0, float x1, float y1)
GradientcreateLinearGradient (const Ogre::Vector2 &pos0, const Ogre::Vector2 &pos1)
GradientcreateRadialGradient (float x0, float y0, float radius0, float x1, float y1, float radius1)
GradientcreateRadialGradient (const Ogre::Vector2 &pos0, float radius0, const Ogre::Vector2 &pos1, float radius1)
PatterncreatePattern (const Ogre::Image &image, Repetition=Repetition_Repeat)
void beginPath ()
void closePath ()
void fill ()
void stroke ()
void clip ()
void moveTo (float x, float y)
void moveTo (const Ogre::Vector2 &pos)
void lineTo (float x, float y)
void lineTo (const Ogre::Vector2 &pos)
void quadraticCurveTo (float cpx, float cpy, float x, float y)
void quadraticCurveTo (const Ogre::Vector2 &controlPoint, const Ogre::Vector2 &pos)
void bezierCurveTo (float cp1x, float cp1y, float cp2x, float cp2y, float x, float y)
void bezierCurveTo (const Ogre::Vector2 &controlPoint1, const Ogre::Vector2 &controlPoint2, const Ogre::Vector2 &pos)
void arcTo (float x1, float y1, float x2, float y2, float radius)
void arcTo (const Ogre::Vector2 &pos1, const Ogre::Vector2 &pos2, float radius)
void arc (float x, float y, float radius, float startRadian, float endRadian, bool anticlockwise)
void arc (const Ogre::Vector2 &pos, float radius, Ogre::Radian start, Ogre::Radian end, bool anticlockwise)
void rect (float x, float y, float w, float h)
void rect (const Ogre::Vector2 &pos, const Ogre::Vector2 &dim)
bool isPointInPath (float x, float y)
bool isPointInPath (const Ogre::Vector2 &pos)
void textSize (float size)
float textSize ()
void textFont (const std::string &family)
std::string textFont ()
void textAlign (TextAlign align)
TextAlign textAlign ()
void textBaseline (TextBaseline baseline)
TextBaseline textBaseline ()
void fillText (const std::string &text, Ogre::Real x, Ogre::Real y, Ogre::Real maxWidth=-1)
void fillText (const std::string &text, const Ogre::Vector2 &pos, Ogre::Real maxWidth=-1)
void strokeText (const std::string &text, Ogre::Real x, Ogre::Real y, Ogre::Real maxWidth=-1)
void strokeText (const std::string &text, const Ogre::Vector2 &pos, Ogre::Real maxWidth=-1)
TextMetrics measureText (const std::string &text)
void clearRect (Ogre::Real x, Ogre::Real y, Ogre::Real w, Ogre::Real h)
void clearRect (const Ogre::Vector2 &pos, const Ogre::Vector2 &dim)
void fillRect (Ogre::Real x, Ogre::Real y, Ogre::Real w, Ogre::Real h)
void fillRect (const Ogre::Vector2 &pos, const Ogre::Vector2 &dim)
void strokeRect (Ogre::Real x, Ogre::Real y, Ogre::Real w, Ogre::Real h)
void strokeRect (const Ogre::Vector2 &pos, const Ogre::Vector2 &dim)
ImageData createImageData (Ogre::Real width, Ogre::Real height)
ImageData createImageData (const Ogre::Vector2 &dim)
ImageData createImageData (ImageData imageData)
ImageData getImageData (Ogre::Real x, Ogre::Real y, Ogre::Real width, Ogre::Real height)
ImageData getImageData (const Ogre::Vector2 &pos, const Ogre::Vector2 &dim)
void putImageData (ImageData imageData, Ogre::Real x, Ogre::Real y, Ogre::Real dirtyX=0, Ogre::Real dirtyY=0)
void putImageData (ImageData imageData, const Ogre::Vector2 &pos, const Ogre::Vector2 &dirty=Ogre::Vector2::ZERO)
unsigned char * getData ()
void saveToFile (const std::string &_filename)
unsigned int width ()
unsigned int height ()

Protected Member Functions

void applyFillStyle ()
void applyStrokeStyle ()
bool pathHasCurrentPoint (SkPath &path)
StategetCurrentState ()

Protected Attributes

unsigned int mWidth
unsigned int mHeight
bool mAlphaEnable
SkPath mPath
SkBitmap * mBitmap
SkDevice * mDevice
SkCanvas * mCanvas
SkPaint * mFillStyle
SkPaint * mStrokeStyle
std::stack< StatemStates

The documentation for this class was generated from the following files:
 All Classes
Generated on Thu Jun 17 10:22:52 2010 for OgreCanvas by  doxygen 1.6.3