TinyLine 2.5

com.tinyline.svg
Class SVGRaster

java.lang.Object
  extended by com.tinyline.svg.SVGRaster

public class SVGRaster
extends java.lang.Object

The SVGRaster class rasterizes the tree of SVGNodes onto the pixel buffer.

Rendering process

Each SVGNode "paint" operation draws over some area of the pixel buffer. When the area overlaps a previously painted area the new paint partially or completely obscures the old. When the paint is not completely opaque, the result is defined by the simple alpha blending rules.

Nodes in the SVGT tree have an implicit z drawing order. Subsequent nodes are painted on top of previously painted nodes.

When a graphic object is rendered, the geometry, image, and attribute information are combined to calculate which pixel values must be changed

paint() vs. update()

What is the purpose of having separate paint() and update() methods? A call to update() implies that the area defined by the device clip rectangle is "damaged" and must be completely repainted or updated, however a call to paint() does not imply this, which enables to do incremental painting.

Version:
1.10

Field Summary
 SVGDocument document
          The current SVGT document
 SVGNode root
          The current SVGT root
static int version
          The SVGRaster version number
 TinyRect viewport
          The current device viewport for this SVGRaster.
 
Constructor Summary
SVGRaster(TinyBuffer pixbuf)
          Constructs a new SVGRaster for the given pixel buffer.
 
Method Summary
 SVGDocument createSVGDocument()
          Creates and returns a new EMPTY SVGT Document.
 void flush()
          Flushs the SVGRaster allocated resources.
 SVGDocument getSVGDocument()
          Returns the current SVGT Document.
 Tiny2D getTiny2D()
          Returns the current Tiny2D object.
 void paint()
          Paints the area under the device clip rectangle.
 void setSVGDocument(SVGDocument doc)
          Sets the new current SVGT document.
 void update()
          Updates the area under the device clip rectangle.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

document

public SVGDocument document
The current SVGT document


root

public SVGNode root
The current SVGT root


version

public static final int version
The SVGRaster version number

See Also:
Constant Field Values

viewport

public TinyRect viewport
The current device viewport for this SVGRaster.

Constructor Detail

SVGRaster

public SVGRaster(TinyBuffer pixbuf)
Constructs a new SVGRaster for the given pixel buffer.

Parameters:
pixbuf - the pixel buffer.
Method Detail

createSVGDocument

public SVGDocument createSVGDocument()
Creates and returns a new EMPTY SVGT Document.


flush

public void flush()
Flushs the SVGRaster allocated resources.


getSVGDocument

public SVGDocument getSVGDocument()
Returns the current SVGT Document.


getTiny2D

public Tiny2D getTiny2D()
Returns the current Tiny2D object.


paint

public void paint()
Paints the area under the device clip rectangle.


setSVGDocument

public void setSVGDocument(SVGDocument doc)
Sets the new current SVGT document.


update

public void update()
Updates the area under the device clip rectangle. The area defined by the device clip rectangle was "damaged" and must be completely repainted.


TinyLine 2.5

Provided under the terms of the TinyLine License Agreement that has been included with this distribution.