How to know the scale for a bitmap in Delphi XE8?


I have an image component for drawing an autograph. At the moment you have to set a scale property mannually in order to let it draw correctly, because each device has an other screen density.

Is there a way to calculate the scale or not to have to use the scale for both Android and iOS?

As you can read in the following link every android and iOS device have a different screen density:

Also tried this method but it does not give the correct scale:

function GetScreenScale: Single;
ScreenService: IFMXScreenService;
Result := 1;
if TPlatformServices.Current.SupportsPlatformService (IFMXScreenService, IInterface(ScreenService)) then
Result := ScreenService.GetScreenScale;

Comments are closed.