摘要:
//在矩形范围中显示文本 var g: TGPGraphics; fontFamily: TGPFontFamily; font: TGPFont; rectF: TGPRectF; p: TGPPen; sb: TGPSolidBrush; str: WideString; begin g := TGPGraphics.Create(Canvas.Handle)... 阅读全文
摘要:
//输出文本 var g: TGPGraphics; sb: TGPSolidBrush; fontFamily: TGPFontFamily; font: TGPFont; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(0,0,255)); fon... 阅读全文
摘要:
//颜色透明度 var g: TGPGraphics; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(128,255,0,0)); {128表示半透明} g.FillRectangle(sb,10,10,100,10... 阅读全文
摘要:
//绘图质量 var g: TGPGraphics; p: TGPPen; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,0,0),2); g.SetSmoothingMode(SmoothingModeHighQuality); {高质量} g.DrawLi... 阅读全文
摘要:
//绘制与填充路径 var g: TGPGraphics; path: TGPGraphicsPath; p: TGPPen; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(128,255,0,0),4); sb := TGPS... 阅读全文
摘要:
//闭合曲线 var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; pts: array[0..4] of TGPPoint; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(255,255,255)); ... 阅读全文
摘要:
//画曲线 var g: TGPGraphics; p: TGPPen; pts: array[0..4] of TGPPoint; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,0,0),4); pts[0].X := 11; pts[0].Y := 11... 阅读全文
摘要:
//画贝塞尔曲线 var g: TGPGraphics; p: TGPPen; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,0,0),2); g.DrawBezier(p, 11,11, 88,333, 99,0, 222,111); {参数是画笔与 4 个点的... 阅读全文
摘要:
//多边形描边与填充 var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; pts: array[0..4] of TGPPoint; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(255,255,255))... 阅读全文
摘要:
//饼图描边与填充 var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(255,255,255)); p := TGPPen.Create(MakeColor(... 阅读全文