TouchVG framework
Public 类型 | Public 成员函数 | 所有成员列表
GiCanvas类 参考abstract

Canvas callback interface device-dependent. 更多...

#include <gicanvas.h>

类 GiCanvas 继承关系图:
Inheritance graph

Public 类型

enum  {
  kLineDashMask = 0xFFF, kLineCapDefault = 0, kLineCapMask = 0x70000, kLineCapButt = 0x10000,
  kLineCapRound = 0x20000, kLineCapSquare = 0x40000, kAlignLeft = 0, kAlignCenter = 1,
  kAlignRight = 2, kAlignHorz = 0xF, kAlignTop = 0, kAlignBottom = 0x10,
  kAlignVCenter = 0x20, kAlignVert = 0xF0
}
 

Public 成员函数

virtual ~GiCanvas ()
 
virtual void setPen (int argb, float width, int style, float phase, float orgw)=0
 Set attributes of the current pen to stroke edges. 更多...
 
virtual void setBrush (int argb, int style)=0
 Set attributes of the current brush to fill shapes. 更多...
 
virtual void clearRect (float x, float y, float w, float h)=0
 Clear `rect' (that is, set the region within the rect to transparent). 更多...
 
virtual void drawRect (float x, float y, float w, float h, bool stroke, bool fill)=0
 Fill or stroke `rect' (w>0, h>0) with the current color. 更多...
 
virtual void drawLine (float x1, float y1, float x2, float y2)=0
 Stroke a line with the current color. 更多...
 
virtual void drawEllipse (float x, float y, float w, float h, bool stroke, bool fill)=0
 Fill or stroke a ellipse with a corner and size (w>0, h>0). 更多...
 
virtual void beginPath ()=0
 Start a new path. 更多...
 
virtual void moveTo (float x, float y)=0
 Ready to add a subpath to the current path at the start point. 更多...
 
virtual void lineTo (float x, float y)=0
 Add a line segment to the current subpath. 更多...
 
virtual void bezierTo (float c1x, float c1y, float c2x, float c2y, float x, float y)=0
 Add a cubic bezier segment to the current subpath. 更多...
 
virtual void quadTo (float cpx, float cpy, float x, float y)=0
 Add a quadratic bezier segment to the current subpath. 更多...
 
virtual void closePath ()=0
 Close the current subpath of the path added by beginPath(). 更多...
 
virtual void drawPath (bool stroke, bool fill)=0
 Draw and clear the current path added by beginPath(). 更多...
 
virtual void saveClip ()=0
 Save the current clipping path. 更多...
 
virtual void restoreClip ()=0
 Restore the current clipping path. 更多...
 
virtual bool clipRect (float x, float y, float w, float h)=0
 Intersect the current clipping path with `rect'. 更多...
 
virtual bool clipPath ()=0
 Intersect the current clipping path with the path added by beginPath(). 更多...
 
virtual bool drawHandle (float x, float y, int type, float angle)=0
 Draw a symbol (GiHandleTypes) whose center will at (x, y). 更多...
 
virtual bool drawBitmap (const char *name, float xc, float yc, float w, float h, float angle)=0
 Draw a image whose center will at (xc, yc). 更多...
 
virtual float drawTextAt (const char *text, float x, float y, float h, int align, float angle)=0
 Draw text in one line. 更多...
 
virtual float drawTextAt (GiTextWidthCallback *c, const char *text, float x, float y, float h, int align, float angle)
 
virtual void clearCachedBitmap (bool clearAll=false)
 Clear the cached bitmap for re-drawing on desktop PC. 更多...
 
virtual bool beginShape (int type, int sid, int version, float x, float y, float w, float h)
 Ready to draw a shape. 更多...
 
virtual void endShape (int type, int sid, float x, float y)
 Complete to draw a shape. 更多...
 

详细描述

Canvas callback interface device-dependent.

Implement a derived class with a graphics library which may be device-dependent. The default unit of its drawing functions is the point (usually equal to the pixel). The default drawing attributes (may be assigned in its beginPaint function) are: 1px black pen, solid line, round end caps, not fill.


该类的文档由以下文件生成:

通用矢量图形框架, 版权所有 (C) 张云贵 2004-2017,BSD 开源许可证