TouchVG framework
Public 成员函数 | 静态 Public 成员函数 | 静态 Public 属性 | Private 属性 | 所有成员列表
GiCanvasAdapter类 参考

使用 Quartz 2D 实现的画布适配器类 更多...

#include <GiCanvasAdapter.h>

类 GiCanvasAdapter 继承关系图:
Inheritance graph

Public 成员函数

 GiCanvasAdapter (GiImageCache *cache=(GiImageCache *) 0)
 
virtual ~GiCanvasAdapter ()
 
bool beginPaint (CGContextRef context, bool fast=false)
 在给定上下文上开始绘制 更多...
 
void endPaint ()
 结束绘制 更多...
 
CGContextRef context ()
 返回绘图上下文 更多...
 
void setPen (int argb, float width, int style, float phase, float orgw)
 Set attributes of the current pen to stroke edges. 更多...
 
void setBrush (int argb, int style)
 Set attributes of the current brush to fill shapes. 更多...
 
void clearRect (float x, float y, float w, float h)
 Clear `rect' (that is, set the region within the rect to transparent). 更多...
 
void drawRect (float x, float y, float w, float h, bool stroke, bool fill)
 Fill or stroke `rect' (w>0, h>0) with the current color. 更多...
 
void drawLine (float x1, float y1, float x2, float y2)
 Stroke a line with the current color. 更多...
 
void drawEllipse (float x, float y, float w, float h, bool stroke, bool fill)
 Fill or stroke a ellipse with a corner and size (w>0, h>0). 更多...
 
void beginPath ()
 Start a new path. 更多...
 
void moveTo (float x, float y)
 Ready to add a subpath to the current path at the start point. 更多...
 
void lineTo (float x, float y)
 Add a line segment to the current subpath. 更多...
 
void bezierTo (float c1x, float c1y, float c2x, float c2y, float x, float y)
 Add a cubic bezier segment to the current subpath. 更多...
 
void quadTo (float cpx, float cpy, float x, float y)
 Add a quadratic bezier segment to the current subpath. 更多...
 
void closePath ()
 Close the current subpath of the path added by beginPath(). 更多...
 
void drawPath (bool stroke, bool fill)
 Draw and clear the current path added by beginPath(). 更多...
 
void saveClip ()
 Save the current clipping path. 更多...
 
void restoreClip ()
 Restore the current clipping path. 更多...
 
bool clipRect (float x, float y, float w, float h)
 Intersect the current clipping path with `rect'. 更多...
 
bool clipPath ()
 Intersect the current clipping path with the path added by beginPath(). 更多...
 
bool drawHandle (float x, float y, int type, float angle)
 Draw a symbol (GiHandleTypes) whose center will at (x, y). 更多...
 
bool drawBitmap (const char *name, float xc, float yc, float w, float h, float angle)
 Draw a image whose center will at (xc, yc). 更多...
 
float drawTextAt (const char *text, float x, float y, float h, int align, float angle)
 Draw text in one line. 更多...
 
- Public 成员函数 继承自 GiCanvas
virtual ~GiCanvas ()
 
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. 更多...
 

静态 Public 成员函数

static float colorPart (int argb, int byteOrder)
 

静态 Public 属性

static const float *const LINEDASH [] = { NULL, patDash, patDot, patDashDot, dashDotdot }
 虚线定义, 0..4 更多...
 

Private 属性

CGContextRef _ctx
 
bool _fill
 
int _fillARGB
 
GiImageCache_cache
 
CGGradientRef _gradient0
 
CGGradientRef _gradient
 

额外继承的成员函数

- Public 类型 继承自 GiCanvas
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
}
 

详细描述

使用 Quartz 2D 实现的画布适配器类


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

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