procedure DrawPolygon(img: TImage32; const polygon: TPathD; fillRule: TFillRule; color: TColor32); overload;
procedure DrawPolygon(img: TImage32; const polygon: TPathD; fillRule: TFillRule; renderer: TCustomRenderer); overload;
procedure DrawPolygon(img: TImage32; const polygons: TPathsD; fillRule: TFillRule; color: TColor32); overload;
procedure DrawPolygon(img: TImage32; const polygons: TPathsD; fillRule: TFillRule; renderer: TCustomRenderer); overload;
uses Img32, Img32.Fmt.PNG, Img32.vector, Img32.Draw; ... var img: TImage32; path: TPathD; rec: TRect; begin img := TImage32.Create(256,256); rec := img.Bounds; Windows.InflateRect(rec, -8,-8); path := Pie(rec, angle15, -angle15); //start with a drop shadow DrawShadow(img, path, frNonZero, 8); //draw the polygon DrawPolygon(img, path, frNonZero, $FF00DD00); //and add a 3D button effect Draw3D(img, path, frNonZero, 10,6); //finish with a solid green outline DrawLine(img, path, 5, clGreen32, esPolygon); img.SaveToFile('pie.png'); img.Free; end;
uses Img32, Img32.Fmt.PNG, Img32.vector, Img32.Draw; ... var img: TImage32; rec: TRect; path: TPathD; imageRenderer: TImageRenderer; begin img := TImage32.Create(256,256); rec := Rect(6,6, 250,250); path := Ellipse(rec); imageRenderer := TImageRenderer.Create(tfsRotate180); imageRenderer.Image.LoadFromResource('TILE', 'BMP'); imageRenderer.Image.Resize(20,20); DrawPolygon(img, path, frEvenOdd, imageRenderer); DrawLine(img, path, 6, clNavy32, esPolygon); img.SaveToFile('tiled_ellipse.png'); imageRenderer.Free; img.Free; end;
uses Img32, Img32.Fmt.PNG, Img32.vector, Img32.Draw; ... var img: TImage32; path: TPathD; rec: TRect; radGradRend: TRadialGradientRenderer; begin img := TImage32.Create(256,256); rec := img.Bounds; Windows.InflateRect(rec, -3,-3); path := Pie(rec, angle15, -angle15); //setup the gradient colors radGradRend := TRadialGradientRenderer.Create; radGradRend.SetParameters(rec, clFuchsia32, clBlue32); radGradRend.InsertColorStop(0.3, clRed32); radGradRend.InsertColorStop(0.4, clYellow32); radGradRend.InsertColorStop(0.5, clYellow32); radGradRend.InsertColorStop(0.7, clLime32); radGradRend.InsertColorStop(0.8, clAqua32); //do the drawing DrawPolygon(img, path, frNonZero, radGradRend); DrawLine(img, path, 5, clMaroon32, esPolygon); img.SaveToFile('pie3.png'); radGradRend.Free; img.Free; end;
Copyright ©2010-2023 Angus Johnson - Image32 4.8 - Help file built on 17 Jan 2025