jPodRenderer PDF library

de.intarsys.pdf.platform.cwt.adapter
Interface IGraphicsEnvironmentAdapter

All Known Implementing Classes:
AwtGraphicsEnvironmentAdapter, CommonGraphicsEnvironmentAdapter, SwtGraphicsEnvironmentAdapter

public interface IGraphicsEnvironmentAdapter

The adapter bridges between the concrete PDF image and the windowing toolkit.

The IGraphicsEnvironment abstracts from the windowing toolkit, for example AWT or SWT. For each such execution environment an IGraphicsEnvironmentAdapter can be registered, that knows how to render the PDF primitives in that environment.

For every operation requested upon a complex PDF implementation object such as a PDImage, the implementation is delegated to an instance of IGraphicsEnvironmentAdapter that knows both about the PDF semantics and the concrete window toolkit active.

While one could design IGraphicsContext in a way that the PDF semantics are already supported, we feel that this would create a hard dependency on CWT, rendering it unusable in non PDF contexts to act as a platform independent environment.


Method Summary
 void drawImage(de.intarsys.cwt.environment.IGraphicsContext graphicsContext, de.intarsys.pdf.pd.PDImage image, float x, float y)
           
 de.intarsys.cwt.environment.IGraphicsEnvironment getGraphicsEnvironment()
           
 void setBackgroundColorPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext, ColorPaint paint)
           
 void setBackgroundPatternPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext, PatternPaint paint)
           
 void setBackgroundShadingPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext, ShadingPaint paint)
           
 void setForegroundColorPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext, ColorPaint paint)
           
 void setForegroundPatternPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext, PatternPaint paint)
           
 void setForegroundShadingPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext, ShadingPaint paint)
           
 

Method Detail

drawImage

void drawImage(de.intarsys.cwt.environment.IGraphicsContext graphicsContext,
               de.intarsys.pdf.pd.PDImage image,
               float x,
               float y)

getGraphicsEnvironment

de.intarsys.cwt.environment.IGraphicsEnvironment getGraphicsEnvironment()

setBackgroundColorPaint

void setBackgroundColorPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext,
                             ColorPaint paint)

setBackgroundPatternPaint

void setBackgroundPatternPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext,
                               PatternPaint paint)

setBackgroundShadingPaint

void setBackgroundShadingPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext,
                               ShadingPaint paint)

setForegroundColorPaint

void setForegroundColorPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext,
                             ColorPaint paint)

setForegroundPatternPaint

void setForegroundPatternPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext,
                               PatternPaint paint)

setForegroundShadingPaint

void setForegroundShadingPaint(de.intarsys.cwt.environment.IGraphicsContext graphicsContext,
                               ShadingPaint paint)

jPodRenderer PDF library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.