Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

High DPI support in OSR demo

Post Reply
User avatar
salvadordf
Posts: 4052
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

High DPI support in OSR demo

Post by salvadordf »

Hi,

I just uploaded some changes to CEF4Delphi. This is what's new :
  • Added high DPI support in OSR demo
  • Added cef.inc files in all demos
  • Fixed some function declarations in the render handler.

WARNING
The SimpleOSRBrowser has a simple and basic OnPaint function that copies the buffer passed from CEF into the PaintBox canvas.
CEF and this demo use a device_scale_factor to calculate logical and real screen sizes. If there's a rounding error CEF and this demo will have slightly different sizes and the OnPaint function will exit, leaving the screen black or not refreshed.
If you need to support high DPI, you'll have to use a better function to copy the buffer.
Post Reply