Closed alexpana closed 10 years ago
in CoreGraphics I had the concept of patterns which I'm using in graphics.cpp, if no such thing is available I guess bitmaps are the next stop ...
I think they might be easily accomplished via a custom implementation of an IWICBitmapSource [1]
[1] http://msdn.microsoft.com/en-us/library/windows/desktop/ee690171%28v=vs.85%29.aspx
I have implemented hatch brushes using a custom implementation of the IWICBitmapSource COM interface.
Unfortunately, the _NEARESTNEIGHBOR sampling mode sometimes gives rise to artifacts as seen in the cyan / vertical hatch. I've seem this artifact in cross hatches, but not as often as with vertical ones. As you can see, the artifact is also visible with bitmap brushes. Using LINEAR sampling is not a viable option (the lines get too thick, they lose their original color, etc). There is no other sampling mode available.
Please click on the image to see it at full resolution.
I think this is definitly good enough for the moment, leave this as a 'may be improved' but this level of feature completeness is definitely enough for me
Thanks. This is implemented in 7b558619c294fe2466dd3f2a7d13a924bea0a4fe
Direct2D doesn't have support for hatch brushes. Two solutions would be: