gdiplus: Implement GdipCreateRegionRgnData. Take 2.

Dmitry Timoshkov dmitry at baikal.ru
Mon Nov 18 20:04:11 CST 2013


Vincent Povirk <madewokherd at gmail.com> wrote:

> Please note that most of this format (everything except the first 8
> bytes of region_header) is documented in MS-EMFPLUS section 2.2.1.8:
> http://msdn.microsoft.com/en-us/library/cc230724.aspx
> 
> +        switch (path_header->flags & FLAGS_INTPATH)
> 
> You should check for other flags here, namely 0x1000 which indicates
> RLE compression of point types and 0x0400 which indicates that points
> are relative to the previous point. (Not saying we need to support
> them initially, but please check so we know if they appear. Also, the
> lower 16 bits other than those flags are supposed to always be 0, so
> maybe we should check them for unknown values as well.)

Supposedly Wine implementation of GdipCreateRegionRgnData should just
support the format of data Wine's GdipGetRegionData. If there are cases
when application feed data created by Windows gdiplus support for that
cases could be added later.

> +    if (!region_header || region_header->magic != VERSION_MAGIC)
> +        return InvalidParameter;
> 
> This should also accept 0xdbc01002, for GDI+ version 1.1.

See above.

> +        if (i == 1) continue; /* data[1] never matches */
> 
> If that's the case, shouldn't you have a test that it doesn't match?

Existing tests just skip this DWORD as well, and I don't see much point
in testing it either.

-- 
Dmitry.



More information about the wine-devel mailing list