Recent

Author Topic: Why Canvas.Line result depends on widgetset  (Read 1077 times)

Valdas

  • New Member
  • *
  • Posts: 49
Why Canvas.Line result depends on widgetset
« on: August 15, 2017, 04:24:56 pm »
Hello,

start a new project and add this code in to OnPaint event of the form:

canvas.MoveTo(1, 10);
canvas.LineTo(2, 10);

In Qt, Qt5 widgetset I get line 2 pixels long, in Gtk2 widgetset I get line 1 pixels long. I cant get clear explanation from Google about that issue. Is this a known bug?

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Why Canvas.Line result depends on widgetset
« Reply #1 on: August 15, 2017, 07:39:28 pm »
That is a known feature yes, For example setting the canvas.antialise property to true has an effect on QT for sure but none on windows. lcl is a light wrapper around those widgetsets and as such it comes with the widget set's pros and cons as well.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018