|
|
Whether you are creating a simple paint program or a complex vector based application, this unique graphics library is for you. Using an extremely simple set of instructions, create output primitives with smooth (anti-aliased) edges in a minute! D-Type Rasterizer is absolutely superior when it comes to high-quality rendering and is most likely the world's fastest grayscale rasterizer. Both D-Type Font Engine and D-Type PowerDoc Engine internally rely on D-Type Rasterizer for rendering fonts and more complex scalable 2D graphics. Classic D-Type RasterizerD-Type Rasterizer represents the foundation of D-Type Engine. Its function is to render high quality anti-aliased grayscale bitmaps in a device independent manner. D-Type Rasterizer is extremely optimized for speed and, by default, makes no use of the floating-point math. This, among other things, is what makes D-Type Rasterizer the fastest grayscale rasterizer in the world. Although D-Type Rasterizer allows developers to construct and render shapes of any type or complexity, the library also ships with a set of helper functions to easily draw most common 2D primitives. This includes lines, curves (Bézier and B-Spline), arcs, circles, ellipses, rectangles, polygons etc. Lines, curves and arcs can be drawn solid or dashed using a custom thickness, while their ends can be flat, rounded (inside or outside) or styled using special symbols. Also, the library allows developers to apply a 2X2 affine transform matrix to any 2D primitive to be drawn. This makes it possible to draw stretched, skewed and/or rotated 2D primitives. As with all other D-Type rendering functions, developers can render to their own device independent memory surfaces (this includes a plethora of formats including 8-bpp grayscale, 16-bpp, 24-bpp RGB and various 32-bpp RGBA formats) or to Windows compatible Device Context surfaces. Also, developers can apply various styles (color, transparency, shadows, blurring, embossing effects, patterns and many other) when rendering 2D primitives. To render a common 2D primitive, it is only necessary to call an appropriate function and pass the required attributes. Alternatively, to render a user-defined shape, one needs to define its edges (this is most easily done using an array) and then call D-Type Rasterizer's rendering function directly. It's fast and easy. D-Type Direct Color RasterizerD-Type Direct Color Rasterizer is a specialized rasterizer that ships with recent versions of D-Type Engine. Unlike the classic D-Type Rasterizer that generates grayscale (or single colour) shapes in a single rasterization pass, D-Type Direct Color Rasterizer is designed to generate multi-colour RGBA images in a single rasterization pass. This unique feature makes it possible for D-Type Direct Color Rasterizer to render high-quality scalable anti-aliased graphics with perfect stitching between adjacent fill areas of different colour. More specifically, with D-Type Direct Color Rasterizer, colour and transparency are an essential part of the rasterization process. Applications only need to assign different RGBA values to different contours during the scene construction phase. Colouring and pixel stitching is then performed automatically by D-Type Direct Color Rasterizer during the very rasterization process. We say that the colour is directly applied, which is why this rasterizer is known as D-Type Direct Color Rasterizer. In contrast, the classic D-Type Rasterizer is completely unaware of the final color that will be applied to the pixels; colouring and pixel stitching is not performed during the rasterization process but at display time, when already rasterized shapes are alpha-blended into the background. To better illustrate the difference between perfect stitching offered by D-Type Direct Color Rasterizer and standard stitching offered by the classic D-Type Rasterizer, compare the following two images:
Both images were generated by rasterizing the same vector art. However, the image generated by D-Type Direct Color Rasterizer (left) looks better than the image generated by the classic D-Type Rasterizer (right). This is because D-Type Direct Color Rasterizer features perfect stitching between adjacent fill areas of different colour. However, this feature does come with one caveat: In order for D-Type Direct Color Rasterizer to generate correctly coloured pixels, the fill areas (contours) in the rendering scene must not overlap. If they do overlap, then the colour of the pixels in the overlapping regions might not be right. To illustrate this, the vector art in our example contains a few overlapping contours. By carefully comparing the colour of various contours in both images, we can see that some of the contours rasterized by D-Type Direct Color Rasterizer (image on the left) are noticeably darker compared to the same contours rasterized by the classic D-Type Rasterizer (image on the right). Note, for example, the top portion of the image on the left. The three black spots are not correctly coloured. This is where some of the contours overlap. Despite this, all the colours generated by the classic D-Type Rasterizer (image on the right) are correct. This limitation is why D-Type Direct Color Rasterizer is not a general purpose rasterizer like the classic D-Type Rasterizer. D-Type Direct Color Rasterizer, however, is ideal for rendering vector based input that is known not to contain any overlapping contours (e.g. scalable vector art produced by most bitmap-to-vector conversion programs and some mapping software). In such cases, the output generated by D-Type Direct Color Rasterizer will look absolutely amazing.
Of course, it is also possible to use D-Type Direct Color Rasterizer to draw only a single-colour scene at a time, much like we use the classic D-Type Rasterizer. In this case all the rendered pixels will be correctly colored. However, the perfect stitching between adjacent fill areas will be lost. This is to say that the perfect stitching algorithm is available only when the entire multi-colour scene is rasterized in a single pass. If a multi-colour scene is broken down into multiple single colour scenes which are then drawn separately, one scene at a time, the resulting image will look the same as if it was generated by the classic D-Type Rasterizer (but will take a little bit longer to generate). This is why we recommend that application developers use D-Type Direct Color Rasterizer only to render (in a single pass) multi-colour scenes without any overlapping contours and the classic D-Type Rasterizer in all other situations. Copyright © 1996-2009 D-Type Solutions. All scalable images on this web site are rendered by D-Type Font Engine, D-Type Rasterizer and/or D-Type PowerDoc Engine. Reproduction, copying, or redistribution for commercial purposes of any materials, images or design elements of this website is prohibited without the prior written consent of D-Type Solutions. All trademarks are the property of their respective holders and are mentioned for identification purposes only. Last updated on August 1, 2010 |