I have a very simple FireMonkey application with a single form and the following code in the OnPaint event. When I run it using the Windows target, I see a red line and a red square. When I run it on my Android Nexus 7, only the square appears. I must be doing something silly, but what might it be?
Thanks for any help.
procedure TForm2.FormPaint(Sender: TObject; Canvas: TCanvas;
const ARect: TRectF);
begin
Canvas.Stroke.Color := claRed;
Canvas.Fill.Color := claRed;
Canvas.Stroke.Thickness := 3;
Canvas.DrawLine( PointF( 0, 0 ), PointF( 200, 200 ), 1.0 );
Canvas.FillRect( RectF( 300, 300, 500, 500 ), 0.0, 0.0, [], 1.0 );
end;
I found that Canvas.Stroke.Kind
under Android is initialised to bkNone
(the 0'th ordinal) so no output.
You need to include Canvas.Stroke.Kind := TBrushKind.bkSolid
before you get output.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With