摘要:
//画弧线 var g: TGPGraphics; p: TGPPen; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,0,0),2); g.DrawArc(p,11,32,300,200,0,90); {参数 2-5 是一个椭圆} p.SetColo... 阅读全文
摘要:
//填充与描边 var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(MakeColor(255,255,255)); p := TGPPen.Create(MakeColor(25... 阅读全文
摘要:
//路径渐变画刷 var g: TGPGraphics; path: TGPGraphicsPath; pb: TGPPathGradientBrush; {声明渐变画刷} num: Integer; const colors: array[0..0] of TGPColor = (aclAqua); begin g := TGPGraphics.Create(Canva... 阅读全文
摘要:
//线性渐变画刷 var g: TGPGraphics; lb: TGPLinearGradientBrush; rect: TGPRect; begin g := TGPGraphics.Create(Canvas.Handle); rect := MakeRect(11,11,222,111); lb := TGPLinearGradientBrush.Create(... 阅读全文
摘要:
//纹理画刷 var g: TGPGraphics; img: TGPImage; tb: TGPTextureBrush; begin g := TGPGraphics.Create(Canvas.Handle); img := TGPImage.Create('c:\temp\small.jpg'); tb := TGPTextureBrush.Create(img)... 阅读全文
摘要:
//阴影画刷 var g: TGPGraphics; hb: TGPHatchBrush; begin g := TGPGraphics.Create(Canvas.Handle); hb := TGPHatchBrush.Create(HatchStyleHorizontal, aclRed, aclYellow); {参数1是阴影样式; 参数2是前景色; 参数3是背景色... 阅读全文
摘要:
//实心画刷 var g: TGPGraphics; sb: TGPSolidBrush; begin g := TGPGraphics.Create(Canvas.Handle); sb := TGPSolidBrush.Create(aclGreen); {参数是颜色} g.FillEllipse(sb, 11, 11, 222, 111); sb.Free; ... 阅读全文
摘要:
//使用画刷建立画笔 var g: TGPGraphics; img: TGPImage; tb: TGPTextureBrush; p: TGPPen; begin g := TGPGraphics.Create(Canvas.Handle); img := TGPImage.Create('c:\temp\small.jpg'); tb := TGPTexture... 阅读全文
摘要:
//复合画笔 var g: TGPGraphics; p: TGPPen; arr: array[0..9] of Single; {10 个元素可以分成 5 条线, 每条线需要起点和终点} begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,255,0,0),100);... 阅读全文
摘要:
//笔对齐 var g: TGPGraphics; p: TGPPen; sb: TGPSolidBrush; rect: TGPRect; begin g := TGPGraphics.Create(Canvas.Handle); p := TGPPen.Create(MakeColor(255,255,0,0),5); sb := TGPSolidBrush.Cr... 阅读全文