Tuesday, June 1, 2010

Filled To The Bursting Point - WriteableBitmapEx 0.9.5.0

We're slowly getting to the first feature complete release of the WriteableBitmapEx library. The last version (0.9.0.0) brought the parametric curves, optimizations and other features. This new version 0.9.5.0 focuses on filling routines, transformations, bug fixes and more optimizations.
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.

New features
  • 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.
    The code listing on the project's CodePlex site was updated to demonstrate how to use the new methods.
      Live
      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.

      Go and grab it
      The WriteableBitmapEx library is hosted at CodePlex. You can find the new binary release here and the samples in the Subversion repository.

        Wednesday, May 26, 2010

        Coding4Fun - Introduction to Silverlight and WPF Pixel Shaders

        My new article for Microsoft's Coding4Fun site is live. It's my second article for Coding4Fun after my first Silverlight Face Detection article. The article explains how to write pixel shaders for Silverlight and WPF, what tools should be used, and how to work with the tools. Furthermore, it shows how to build an extensible Silverlight shader application with the help of the Managed Extensibility Framework (MEF)
        The application not only comes with the two shaders that are implemented in the article, it also contains three other shaders I’ve written before. The complete source code is licensed under the Ms-PL and can be downloaded from the CodePlex site.

        Monday, May 17, 2010

        SLARToolkit Beginner's Guide

        Since I released SLARToolkit I often get similar, basic questions. This is a sign that the SLARToolkit documentation and the samples might be too complex for a beginner. That's why I wrote an easy step by step Beginner's Guide which hopefully closes the gap. The tutorial shows how to build the simplest Silverlight Augmented Reality application possible.

        The guide is part of the SLARToolkit documentation at CodePlex. Please read the Beginner's Guide here and let me know your feedback so I can improve it further.

        Thursday, April 15, 2010

        Silverlight 4 Up and Running

        Woohoo! The final Silverlight 4 runtime and the developer tools for Visual Studio 2010 were released today and exactly three years ago the name Silverlight was officially introduced. A lot of great things happened in the Silverlight world since then and we now have a superb RIA platform at hand.

        To get started with the Silverlight 4 development you only need Visual Studio 2010 and the Silverlight 4 Tools for Visual Studio. Don't forget, it's all free with the Visual Studio 2010 Express edition! The end-user runtime is available for Windows and Mac. As usual, Tim Heuer wrote a nice blog post about the Silverlight tools.

        Past
        The APIs haven't changed much since the last release candidate (RC) and exactly one month ago I wrote a summary of all the new features that were added since the Silverlight 4 Beta to the Silverlight 4 RC and the breaking changes. The post also contained some details about the CaptureSource's changed capture usage pattern. So if you used the Silverlight 4 Beta and skipped the RC, this post might be helpful.

        Present
        I installed the Visual Studio 2010 RTM build on Monday after it was released at Devconnections, the final Silverlight 4 Tools for Visual Studio today and recompiled all my Silverlight 4 samples and open source projects. It all worked like a charm and even on this machine were I had several betas of all the tools installed before. Kudos to the Visual Studio and the Silverlight team for making such great products.
        My relevant Silverlight 4 blog posts, the SLARToolkit and the FaceLight CodePlex open source projects are now up to date.

        Future
        The first beta of the next Silverlight version will most certainly see the light this year. Make sure to vote or suggest new features at the silverlight.mswish.net site. The most important feature suggestion for me is the GPU accelerated 3D support that I suggested a while ago and which was consolidated into this suggestion. If you agree with me, you should vote for it.

        Have fun with Silverlight 4!

        Thursday, April 1, 2010

        Microsoft Silverlight MVP Award

        Today, I got an exiting Email from Microsoft:

        Congratulations! We are pleased to present you with the 2010 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in Silverlight technical communities during the past year.

        I hope it wasn't an April Fools' joke. ;-)

        It's a real honor for me to get the Silverlight MVP award. All the Silverlight MVPs I know are truly outstanding and I can hardly believe I'm considered to be one of them now. It's even more surreal that I'm the first Silverlight MVP from Germany and the second from the DACH region after the excellent Laurent Bugnion.

        I would like to thank Microsoft, the great Silverlight community and especially all that nominated me for the MVP award. It's needless to say that I will continue my work with Silverlight to provide more useful content and I hope I'll be able to satisfy the high expectations.

        Thank you all!