Debian Codegraph @

freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/gdi/BeginPath.java

raw
1 // Copyright 2002, FreeHEP.
2 package org.freehep.graphicsio.emf.gdi;
3
4 import java.io.IOException;
5 import java.awt.geom.GeneralPath;
6 import java.awt.geom.AffineTransform;
7
8 import org.freehep.graphicsio.emf.EMFInputStream;
9 import org.freehep.graphicsio.emf.EMFTag;
10 import org.freehep.graphicsio.emf.EMFRenderer;
11
12 /**
13 * BeginPath TAG.
14 *
15 * @author Mark Donszelmann
16 * @version $Id: freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/gdi/BeginPath.java c0f15e7696d3 2007/01/22 19:26:48 duns $
17 */
18 public class BeginPath extends EMFTag {
19
20 public BeginPath() {
21 super(59, 1);
22 }
23
24 public EMFTag read(int tagID, EMFInputStream emf, int len)
25 throws IOException {
26
27 return this;
28 }
29
30 /**
31 * displays the tag using the renderer
32 *
33 * @param renderer EMFRenderer storing the drawing session data
34 */
35 public void render(EMFRenderer renderer) {
36 // The BeginPath function opens a path bracket in the specified
37 // device context.
38 renderer.setPath(new GeneralPath(
39 renderer.getWindingRule()));
40 renderer.setPathTransform(new AffineTransform());
41 }
42 }