On 6/27/07, Evan Stade <estade at gmail.com> wrote:
Hi,
[try2] The patch I sent yesterday was not properly todo_wined. Also, this test is a bit more extensive (about twice as many points drawn). It uses various point-type combination (even non-sensical ones such as PT_LINETO | PT_MOVETO) to test the exact logic of PolyDraw with an open path.
changelog:
- added polydraw test to path testing (5 more todo_wines)
dlls/gdi32/tests/path.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 70 insertions(+), 0 deletions(-)
-- Evan Stade
Well I am obviously not Alexandre but I'll hazard a guess. I don't think my advice/style comments which I sent yesterday kept the patch out, but the second patch definitely looks like it might have kept the patchset out.
Specifically, a gem from gdi_private.h:
/* It should not be necessary to access the contents of the GdiPath * structure directly; if you find that the exported functions don't * allow you to do what you want, then please place a new exported * function that does this job in path.c. */
Now I would almost be willing to bet money on the fact that Alexandre would want you to split your second patch up into a PATH_PolyDraw and your non-path case, then the PolyDraw in painting.c would go something like:
if(PATH_IsPathOpen(dc->path)) ret = PATH_PolyDraw(dc, ...); else if(dc->funcs->pPolyDraw) ret = dc->funcs->pPolyDraw(dc->physDev, ...); else { /* Stuff to do in case of no open path */ }
GDI_ReleaseObj(hdc); return ret;
--- Misha
p.s. Also your BYTE polydraw_tps should be static (minor point).
p.p.s. Just to satisfy my anal retentiveness, and to make the test patch look nicer, if you end up resubmitting anyway you might as well put this in (note I changed some of your 1's to 2's because technically a 2 means an entry is completely skipped in wine, and a 1 means it is present in wine but does not quite match, although in this case either one will get you a successful todo_wine so it doesn't really matter):
static const path_test_t polydraw_path[] = { {300, 300, PT_MOVETO, 0, 0}, /* 0 */ {150, 200, PT_LINETO, 0, 0}, /* 1 */ {200, 150, PT_LINETO | PT_CLOSEFIGURE, 0, 0}, /* 2 */ {300, 300, PT_MOVETO, 0, 1}, /* 3 */ {300, 300, PT_LINETO, 0, 0}, /* 4 */ {400, 300, PT_LINETO, 0, 0}, /* 5 */ {400, 350, PT_LINETO, 0, 0}, /* 6 */ {50, 100, PT_MOVETO, 0, 0}, /* 7 */ {100, 50, PT_LINETO, 0, 0}, /* 8 */ {400, 250, PT_LINETO, 0, 0}, /* 9 */ {500, 300, PT_LINETO, 0, 0}, /* 10 */ {500, 350, PT_LINETO, 0, 0}, /* 11 */ {350, 400, PT_MOVETO, 0, 2}, /* 12 */ {600, 200, PT_LINETO, 0, 2}, /* 13 */ {500, 150, PT_LINETO, 0, 0}, /* 14 */ {500, 350, PT_MOVETO, 0, 2}, /* 15 */ {500, 150, PT_LINETO, 0, 2}, /* 16 */ {100, 200, PT_LINETO, 0, 0}, /* 17 */ {400, 150, PT_LINETO, 0, 0}, /* 18 */ {400, 350, PT_LINETO, 0, 0}}; /* 19 */