com.tensegrity.graphics.render
Interface Renderer

All Known Subinterfaces:
RendererChain
All Known Implementing Classes:
DefaultRenderer, DefaultRendererChain, DefaultRendererMono, DefaultRendererWireFrame, DefaultRendererXOR

public interface Renderer

The Renderer interface defines a role which is capable of rendering a graphical object in a certain context. Graphical objects are described through an object of type RenderingData. To render a graphical object, a Renderer uses an Illustrator instance as the RenderingData key. A Renderer can also be seen as a filter that modifies the attributes of the graphical object with respect to the Renderer itself and its configuration.

The configuration of a Renderer is represented by a RendererConfiguration object and is accessible through method getConfiguration().

Normally a Renderer is invoked by a call to method render(). This method adjusts the given RenderingData as arranged and then calls the Illustrator to output the graphical object using the modified RenderingData onto the given Device.

Renderers can be concatenated in a RendererChain. This way the functionalities of multiple Renderer instances can be used for an output process. In a chain the method render() gets called by the RendererChain only for the last Renderer object in the chain, because this method outputs the given data to the given Device. Method adjustData() gets called that on all predecessors and modifies the RenderingData according to the Renderer object and its configuration.

REVIEWJAVADOC: (Renderer.java) The previous paragraph also has a couple of confusing sentences that need to be slightly rewritten.

Version:
$Id: Renderer.java,v 1.13 2005/12/09 15:31:54 KevinCVS Exp $
Author:
MichaelKegel

Field Summary
static int RENDERERFLAG_PROCESS_PORTS_ONLY
          Flags that can be set on a Renderer.
 
Method Summary
 void adjustData(RenderingData renderdata)
          This method modifies the RenderingData instance given by renderdata according to the Renderer instance and the configuration of it.
 RendererConfiguration getConfiguration()
          Returns the current configuration of the Renderer.
 void render(RenderingData renderdata, Device device)
          This method renders the RenderingData object given by renderdata onto the Device given by device.
 

Field Detail

RENDERERFLAG_PROCESS_PORTS_ONLY

public static final int RENDERERFLAG_PROCESS_PORTS_ONLY
Flags that can be set on a Renderer.

See Also:
Constant Field Values
Method Detail

getConfiguration

public RendererConfiguration getConfiguration()
Returns the current configuration of the Renderer. The configuration is represented by a RendererConfiguration object. To get more informations about this kind of object take a look at the documentation of RendererConfiguration.

Returns:
RendererConfiguration the current configuration of the Renderer

adjustData

public void adjustData(RenderingData renderdata)
This method modifies the RenderingData instance given by renderdata according to the Renderer instance and the configuration of it.

Parameters:
renderdata - the RenderingData instance to modify

render

public void render(RenderingData renderdata,
                   Device device)
This method renders the RenderingData object given by renderdata onto the Device given by device. The rendering process is done according to the Renderer instance and the configuration of it.

Parameters:
renderdata - the RenderingData instance to render
device - the Device instance to render onto


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.