Does anybody know what algorithm is used for polygon drawing?
http://msdn.microsoft.com/en-us/library/dd162814

<http://msdn.microsoft.com/en-us/library/dd162814>MSDN doesn't say anything
about it, but my guess is that Polygon() uses the same line drawing
algorithm as LineTo():
http://msdn.microsoft.com/en-us/library/dd145029

<http://msdn.microsoft.com/en-us/library/dd145029>I don't recall exactly
where I read that, but LineTo() should be using some algorithm based on
Bresenham. I still haven't had the time to experiment with it, but I recall
reading on certain forums that people were having trouble figuring it out
for polygon drawing as well.

More on Bresenham:
http://www.comp.dit.ie/bmacnamee/materials/graphics/2006-2007Lectures/Graphics6-BresenhamCirclesAndPolygons.ppt

A subtle difference in algorithms could cause weird problems.

I started writing a program to generate test data for GDI implementations,
but haven't got to polygon drawing yet:
https://github.com/awakecoding/GdiTest

This is meant to extend the current tests in libfreerdpgdi, but could help
with xfreerdp as well. It's written in Gtk# with MonoDevelop, but requires
Windows since it makes calls to the native Win32 GDI API.

On Fri, Apr 1, 2011 at 4:22 PM, Christian Nilsson <[email protected]> wrote:

> On Fri, Apr 1, 2011 at 2:14 PM, Otavio Salvador <[email protected]>
> wrote:
> > We have used internet explorer to test but it seems your testcase is
> > better since the affected area is bigger. We really have no clue how
> > to fix it but this would be nice to be looked at.
> >
> > Let's see if someone can help on that.
>
>
> I took a look...
> Tried different things to understand what does what, after a while i
> came up with attached patch.
> Don't know if it's the correct place, or even if it should be needed,
> but with this it looks correct for me in both Visual Studio, and the
> border in Internet Explorer.
>
> One thing that i have yet to figure out is how to get debug output for
> the RD_POINT * point data?
>
> /Christian
>
>
> ------------------------------------------------------------------------------
> Create and publish websites with WebMatrix
> Use the most popular FREE web apps or write code yourself;
> WebMatrix provides all the features you need to develop and
> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
>
> _______________________________________________
> Freerdp-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/freerdp-devel
>
>
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Freerdp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to