Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   FMX polygon mit einem Fillpattern zeichnen (https://www.delphipraxis.net/206656-fmx-polygon-mit-einem-fillpattern-zeichnen.html)

bernhard_LA 15. Jan 2021 14:33

FMX polygon mit einem Fillpattern zeichnen
 
ich möcht nicht nur einfach gefüllte Polygone zeichnen sondern Polygone mit einem bestimmten Füllpattern gefüllt sind.
Geht dies nur über eine Bitmap die ich mit meinem Füllpattern in den Brush laden muss ?




Delphi-Quellcode:
 var
  i: Integer;
  MyPolygon: TPolygon;
  Brush: TBrush;
begin

  Brush := TBrush.Create(TBrushKind.Solid, TAlphaColors.red);

  for i := Low(FPolygonArray) to High(FPolygonArray) do
  begin
    MyPolygon := FPolygonArray[i];

    Brush.Color := randomColor;

    localBMP.Canvas.BeginScene;
    // draws the polygon on the canvas
    localBMP.Canvas.Fill := Brush;
    localBMP.Canvas.FillPolygon(MyPolygon, FOpacity);
    localBMP.Canvas.EndScene;
    // updates the bitmap

  end;

Rollo62 15. Jan 2021 14:48

AW: FMX polygon mit einem Fillpattern zeichnen
 
Könnte sein.
Schau Dir auch mal TPath an, statt Polygon.
http://docwiki.embarcadero.com/Libra....Objects.TPath

Es gibt ja die Folgenden FillPattern
http://docwiki.embarcadero.com/Libra...cs.TBrush.Kind

Mit Resource / TBrushResource könnte es eventuell noch eine Option geben.


Alle Zeitangaben in WEZ +1. Es ist jetzt 22:08 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz