Talk:FMXTCanvasFillFunctions (Delphi)

From RAD Studio Code Examples
Jump to: navigation, search

The example make use of BitmapChanged which is no more available. The code should be updated. See

the code like this //--------------------------------------- procedure TForm1.Button1Click(Sender: TObject); var

 p1, p2: TPointF;


 Image1.Bitmap.Canvas.Fill.Color :=TAlphaColors.Black;
 // Sets the center of the arc
 p1.Create(200, 200);
 // sets the radius of the arc
 p2.Create(150, 150);
 // fills and draws the arc on the canvas
 Image1.Bitmap.Canvas.FillArc(p1, p2, 90, 230, 20);
 // updates the bitmap


procedure TForm1.FormCreate(Sender: TObject); begin

 Image1.Bitmap.Create(400, 400);

end; //--------------------------------------- but when button1 Clicked, the Image1 nothing to happened.

Thank you for the input! We will analyze your suggestion as soon as possible. -- Denisa Ilascu


Button1 has the following implementation of its OnClick event:

procedure TForm1.Button1Click(Sender: TObject);
  // clears the canvas

This implementation clears the image of the previous drawings issued by the RadioButtons.

Your implementation of Button1 is the same as the example's RadioButton11 but with an additional color select line. And this works quite as expected. Changes the color to black, then renders what the first RadioButton should render.