01: package net.refractions.udig.mapgraphic.internal;
02:
03: import java.awt.Graphics2D;
04:
05: import net.refractions.udig.mapgraphic.MapGraphicContext;
06: import net.refractions.udig.project.internal.Layer;
07: import net.refractions.udig.project.internal.Map;
08: import net.refractions.udig.project.internal.render.RenderManager;
09: import net.refractions.udig.project.internal.render.impl.RenderContextImpl;
10: import net.refractions.udig.project.render.IRenderContext;
11: import net.refractions.udig.ui.graphics.AWTGraphics;
12: import net.refractions.udig.ui.graphics.ViewportGraphics;
13:
14: public class MapGraphicContextImpl extends RenderContextImpl implements
15: MapGraphicContext {
16:
17: private ViewportGraphics vpg;
18:
19: public MapGraphicContextImpl(IRenderContext context,
20: Graphics2D destination) {
21: super ();
22: setGeoResourceInternal(context.getGeoResource());
23: setLayerInternal((Layer) context.getLayer());
24: setRenderManagerInternal((RenderManager) context
25: .getRenderManager());
26: setMapInternal((Map) context.getMap());
27: vpg = new AWTGraphics(destination);
28: }
29:
30: public ViewportGraphics getGraphics() {
31: return vpg;
32: }
33:
34: }
|