The new Fill* extension methods are equivalent to the Draw* shape functions. The FillRectangle and FillEllipse methods use specialized implementations to get the best performance. FillPolygon and the other functions use a simple scanline conversion algorithm with the even-odd-rule. The implemented algorithm supports concave and convex shapes.
- Fast FillRectangle method that uses Buffer.BlockCopy.
- Optimized FillEllipse and FillEllipseCentered functions to draw a filled ellipse / circle.
- FillPolygon, FillTriangle and FillQuad methods that use a scanline conversion algorithm.
- FillCurve, FillCurveClosed to draw a filled Cardinal spline similar to the GDI+ API.
- FillBeziers draws a filled Cubic Beziér spline.
- Resize method with support for Bilinear and Nearest neighbor interpolation.
- Fast Crop method to cut out a portion of the WriteableBitmap.
- GetPixel and GetPixeli methods to get the color as Color struct at a specified x, y coordinate.
- FromResource method to load an image from the application's resource only by passing the relative path without the need of the full Pack URI syntax. Example: "Data/flower2.png" instead of "MyAssemblyName;component/Data/flower2.png".
- Optimized Clear(Color) method that uses Buffer.BlockCopy.
- Renamed BlendMode "AlphaBlend" to "Alpha".
- Fixed the clipping of the DrawEllipse methods.
- Fixed some missing alpha pre-multiplications.
- Other minor tweaks and bug fixes.
- Updated the solutions to Microsoft Visual Studio 2010.
As usual I also wrote a new sample application that shows the Fill* methods in action. The sample starts with a real-time demo that animates the Cardinal spline's tension of the FillCurveClosed method, plus some random animated filled ellipses. The sample also contains a static page showing some of the possible filled shapes.
The WriteableBitmapEx library is hosted at CodePlex. You can find the new binary release here and the samples in the Subversion repository.