TouchVG framework
|
使用GDI+实现的画布适配器类. 更多...
#include <GiGdipCanvas.h>
类 | |
struct | Impl |
GiGdipCanvas 的内部实现类 更多... | |
Public 成员函数 | |
GiGdipCanvas () | |
virtual | ~GiGdipCanvas () |
bool | beginPaint (HWND hwnd, HDC hdc) |
给定绘图设备DC,开始绘制 更多... | |
bool | beginPaintBuffered (int width, int height, COLORREF bkcolor=(COLORREF) -1) |
给定缓冲位图的大小,开始绘制并清除背景 更多... | |
void | endPaint () |
结束绘制 更多... | |
void | clearWindow () |
使用背景色清除显示 更多... | |
bool | drawCachedBitmap (int x=0, int y=0, bool secondBmp=false) |
显示上次缓存的内容 更多... | |
bool | drawCachedBitmap2 (GiGdipCanvas &cv, bool secondBmp=false, int x=0, int y=0) |
显示另一个画布的上次缓存的内容 更多... | |
void | saveCachedBitmap (bool secondBmp=false) |
缓存显示的内容 更多... | |
void | clearCachedBitmap (bool clearAll=false) |
清除后备缓冲位图,以便重新绘图 更多... | |
bool | hasCachedBitmap (bool secondBmp=false) const |
返回是否有已缓存的显示内容 更多... | |
bool | isBufferedDrawing () const |
返回当前是否在缓冲位图上绘图,调用endPaint()前有效 更多... | |
GiGdipCanvas * | thumbnailImage (int maxWidth, int maxHeight) |
从缓冲位图生成指定宽高上限的缩略图,该图为新画布对象的缓冲位图 更多... | |
bool | save (const wchar_t *filename, long jpegQuality=100) |
将缓冲位图保存到文件中 更多... | |
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 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. 更多... | |
Private 成员函数 | |
bool | getEncoder (const wchar_t *filename, wchar_t format[20], CLSID &clsidEncoder) |
void | _beginPaint () |
Private 属性 | |
Impl * | _impl |
额外继承的成员函数 | |
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 } |
使用GDI+实现的画布适配器类.