Debian Codegraph @

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

raw
1 // Copyright 2002, FreeHEP.
2 package org.freehep.graphicsio.emf.gdi;
3
4 import java.io.IOException;
5
6 import org.freehep.graphicsio.emf.EMFConstants;
7 import org.freehep.graphicsio.emf.EMFInputStream;
8 import org.freehep.graphicsio.emf.EMFOutputStream;
9 import org.freehep.graphicsio.emf.EMFTag;
10 import org.freehep.graphicsio.emf.EMFRenderer;
11
12 /**
13 * SelectClipPath TAG.
14 *
15 * @author Mark Donszelmann
16 * @version $Id: freehep-graphicsio-emf/src/main/java/org/freehep/graphicsio/emf/gdi/SelectClipPath.java 59372df5e0d9 2007/02/06 21:11:19 duns $
17 */
18 public class SelectClipPath extends AbstractClipPath {
19
20 public SelectClipPath() {
21 super(67, 1, EMFConstants.RGN_AND);
22 }
23
24 public SelectClipPath(int mode) {
25 super(67, 1, mode);
26 }
27
28 public EMFTag read(int tagID, EMFInputStream emf, int len)
29 throws IOException {
30
31 return new SelectClipPath(emf.readDWORD());
32 }
33
34 public void write(int tagID, EMFOutputStream emf) throws IOException {
35 emf.writeDWORD(getMode());
36 }
37
38 /**
39 * displays the tag using the renderer
40 *
41 * @param renderer EMFRenderer storing the drawing session data
42 */
43 public void render(EMFRenderer renderer) {
44 render(renderer, renderer.getPath());
45 }
46 }