[fpc-devel] TFPCustomCanvas Expanded Clipping

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Thu Dec 8 16:18:37 CET 2011

On Thu, Dec 8, 2011 at 11:49 AM, Hans-Peter Diettrich
<DrDiettrich1 at aol.com> wrote:
> I'd suggest that you use the TCanvas conventions, before you run into well
> known pitfalls.
> E.g. an empty rectangle should be (x,y, x,y), while a single pixel should be
> (x,y, x+1,y+1). The Width is Right-Left, not Right-Left+1. Otherwise
> combining regions, tiling (tables...), rotating etc. will be overly
> complicated and consequently almost buggy.

Yes, in the case of the rectangle drawing I think it was a typo by who
implemented the current rectangle in fcl-image, I have done various
similar typos in my coding and they don't mean I really wanted to
redefine rectangle.

But the TCanvas line is trully confusing by not adding the last pixel.

Felipe Monteiro de Carvalho

More information about the fpc-devel mailing list