Re: [Lazarus] Canvas.Rectangle question

2019-08-16 Thread Graeme Geldenhuys via lazarus
On 16/08/2019 8:01 pm, Bo Berglund via lazarus wrote: > Seems like if one does not draw the border at all (pen.width = 0) the > resulting rectangle will be painted within a pixel correctly placed > and sized. If I recall correctly, both Win32 and XLib will render a line with the thinnest possible

Re: [Lazarus] Canvas.Rectangle question

2019-08-16 Thread Bo Berglund via lazarus
On Fri, 16 Aug 2019 18:27:02 +0100, Graeme Geldenhuys via lazarus wrote: >On 16/08/2019 4:20 pm, Bo Berglund via lazarus wrote: >> Say the rectangle is (10,4, 30,14) and the Pen.Wdth is set to 2, is >> the resulting shape 20 x 10 or 24 x 14 in size? > >This is why fpGUI uses (x, y, width, height)

Re: [Lazarus] Canvas.Rectangle question

2019-08-16 Thread Graeme Geldenhuys via lazarus
On 16/08/2019 4:20 pm, Bo Berglund via lazarus wrote: > Say the rectangle is (10,4, 30,14) and the Pen.Wdth is set to 2, is > the resulting shape 20 x 10 or 24 x 14 in size? This is why fpGUI uses (x, y, width, height) instead of (x1, y1, x2, y2), because the latter is just too confusing. Anyway,

[Lazarus] Canvas.Rectangle question

2019-08-16 Thread Bo Berglund via lazarus
I would like to know if the rectangle drawn by a Canvas.Rectangle(Rect) call will be sized according to Rect inside of the bounding line or the outside of line? Say the rectangle is (10,4, 30,14) and the Pen.Wdth is set to 2, is the resulting shape 20 x 10 or 24 x 14 in size? -- Bo Berglund Dev