FireMonkey: Missing Anti-Aliasing and jiggling effect on Android


I created a progress animation with a TArc in Delphi 10.4 (FMX) but there are some weird rendering behaviours when running the app on Android.

None of the simple shapes, like TArc or TLine, seem to have Anti-Aliasing. Setting TForm.Quality to HighQuality seems to have no effect.

Setting Arc1.Stroke.Cap := TStrokeCap.Round; seems to have no effect on Android. The ends are not rounded at all.*

There seems to be some kind of jiggling problem with TFloatAnimation, but I cannot find out why.*

*Everything looks and works good when running the app on Windows (10), but on Android there are these glitches and I would like to know, what the problem is. Especially with the missing Anti-Aliasing. Displays on smartphones are high-density, but the missing Anti-Aliasing is still very clearly visible. Here is a video captured from an Android device and from a desktop PC running Windows 10:

Here’s an example code:
object Form1: TForm1
Left = 0
Top = 0
Caption = ‘Form1’
ClientHeight = 344
ClientWidth = 427
Fill.Color = claLightskyblue
Fill.Kind = Solid
FormFactor.Width = 320
FormFactor.Height = 480
FormFactor.Devices = [Desktop]
DesignerMasterStyle = 0
object Arc1: TArc
Align = Center
Size.Width = 60.000000000000000000
Size.Height = 60.000000000000000000
Size.PlatformDefault = False
Stroke.Color = claWhite
Stroke.Thickness = 5.000000000000000000
Stroke.Cap = Round
EndAngle = 90.000000000000000000
object FloatAnimationStartAngle: TFloatAnimation
Enabled = True
Duration = 2.000000000000000000
Loop = True
PropertyName = ‘StartAngle’
StartValue = 0.000000000000000000
StopValue = 360.000000000000000000
object FloatAnimationEndAngle: TFloatAnimation
Enabled = True
Duration = 2.000000000000000000
OnFinish = FloatAnimationEndAngleFinish
PropertyName = ‘EndAngle’
StartValue = 1.000000000000000000
StopValue = 360.000000000000000000

// …stripped code here at top…

increasing: Boolean = True;

{$R *.fmx}

procedure TForm1.FloatAnimationEndAngleFinish(Sender: TObject);
FloatAnimationEndAngle.Enabled := false;
FloatAnimationEndAngle.Inverse := not FloatAnimationEndAngle.Inverse;

if increasing then
FloatAnimationEndAngle.Duration := FloatAnimationEndAngle.Duration * 2.0
FloatAnimationEndAngle.Duration := FloatAnimationEndAngle.Duration / 2.0;

increasing := not increasing;
FloatAnimationEndAngle.Enabled := true;

Comments are closed.