Recent

Author Topic: High resolution canvas for Retina displays  (Read 5037 times)

jwdietrich

  • Hero Member
  • *****
  • Posts: 1032
    • formatio reticularis
High resolution canvas for Retina displays
« on: June 24, 2012, 02:10:26 pm »
What are the required steps to arrange a canvas to support high resolution mode on Retina displays?
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.0.2 | FPC 3.0.4 | PPC, Intel, ARM | macOS, Windows, Linux

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 152
Re: High resolution canvas for Retina displays
« Reply #1 on: October 21, 2012, 04:22:07 pm »
I have no solution for high resolution canvas for retina display, but I have found how to disable scaling (blurred text) for Lazarus apps on retina.

Attached patch should be applied to LCL and the following lines should be added to Info.plist of your app:

Code: [Select]
<key>NSHighResolutionCapable</key>
<true/>

After that all text will be rendered in native resolution and all images will be scaled automatically. There are no side effects as far as I see.