pom.xml 0000644 0001750 0001750 00000002237 10635744456 011435 0 ustar user01 user01
vectorgraphics
org.freehep
2.1.1
4.0.0
org.freehep
freehep-graphicsio-java
FreeHEP Java Driver
FreeHEP Java Driver
freehep-maven
Maven FreeHEP
http://java.freehep.org/maven2
org.freehep
freehep-graphicsio
2.1.1
org.freehep
freehep-graphicsio-tests
2.1.1
junit
junit
src/ 0000700 0001750 0001750 00000000000 11343126076 010656 5 ustar user01 user01 src/main/ 0000700 0001750 0001750 00000000000 11343126076 011602 5 ustar user01 user01 src/main/java/ 0000700 0001750 0001750 00000000000 11343126076 012523 5 ustar user01 user01 src/main/java/org/ 0000700 0001750 0001750 00000000000 11343126074 013310 5 ustar user01 user01 src/main/java/org/freehep/ 0000700 0001750 0001750 00000000000 11343126074 014726 5 ustar user01 user01 src/main/java/org/freehep/graphicsio/ 0000700 0001750 0001750 00000000000 11343126074 017056 5 ustar user01 user01 src/main/java/org/freehep/graphicsio/java/ 0000700 0001750 0001750 00000000000 11343126076 020001 5 ustar user01 user01 src/main/java/org/freehep/graphicsio/java/JAVAGraphics2D.java 0000644 0001750 0001750 00000175501 10631747562 023267 0 ustar user01 user01 // Copyright 2003-2007, FreeHEP.
package org.freehep.graphicsio.java;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Component;
import java.awt.Composite;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.awt.Insets;
import java.awt.Paint;
import java.awt.Polygon;
import java.awt.Rectangle;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.Stroke;
import java.awt.TexturePaint;
import java.awt.Toolkit;
import java.awt.font.FontRenderContext;
import java.awt.font.GlyphVector;
import java.awt.font.ImageGraphicAttribute;
import java.awt.font.ShapeGraphicAttribute;
import java.awt.geom.AffineTransform;
import java.awt.geom.PathIterator;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.awt.image.BufferedImageOp;
import java.awt.image.ImageObserver;
import java.awt.image.RenderedImage;
import java.awt.image.AffineTransformOp;
import java.awt.image.ConvolveOp;
import java.awt.image.Kernel;
import java.awt.image.renderable.RenderableImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.BufferedOutputStream;
import java.io.StringWriter;
import java.text.AttributedCharacterIterator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.SortedSet;
import java.util.TooManyListenersException;
import java.util.TreeSet;
import java.util.HashSet;
import org.freehep.graphics2d.TagString;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.png.PNGEncoder;
import org.freehep.util.UserProperties;
import org.freehep.util.Value;
import org.freehep.util.io.IndentPrintWriter;
import org.freehep.util.io.LineNumberWriter;
/**
* Exports the java calls made to Graphics2D as source code, with the associated
* class, field and method definitions, resulting in a class which, when run
* will produce the same display. Generating such source code may be helpful in
* setting up test cases without a lot of machinery around it and in debugging
* problems for different formats.
*
* Due to size limitations in the bytecode, see Lindholm and Yellin, "The Java
* Virtual Machine Specification", p. 136-137, 1997, the following was taken
* into account:
*
* - Maximum size of bytecode is 65535 per method; we chain paint() methods
* and limit them by number of lines (our best approximation for bytecode).
*
- Maximum number of constants is 65535 per class; we generate separate
* inner classes for each paint method (see above) so that the number of
* constants is limited.
*
*
* @author Mark Donszelmann
* @version $Id: JAVAGraphics2D.java 12618 2007-06-07 17:27:14Z duns $
*/
public class JAVAGraphics2D extends VectorGraphics implements
LineNumberWriter.LineNumberListener {
private static final int MAX_LINES_PER_METHOD = 200;
private Map /* */vg = new HashMap();
private SortedSet /**/ imports = new TreeSet();
private Value vgIndex = new Value().set(0);
private Value paintSequenceNo = new Value().set(0);
private Value blockLevel = new Value().set(0);
private UserProperties properties;
private int width = 800;
private int height = 600;
private String className = "TemporaryName";
private OutputStream os;
private ByteArrayOutputStream bos;
private LineNumberWriter lineWriter;
private IndentPrintWriter out;
private Color backgroundColor;
private Color color = Color.WHITE;
private Paint paint = Color.BLACK;
private String creator = "FreeHEP JAVAGraphics2D";
private int colorMode = 0; // CHECK
private Stroke stroke = new BasicStroke(); // CHECK
private AffineTransform transform = new AffineTransform();
private RenderingHints hints = new RenderingHints(null);
private boolean isDeviceIndependent;
private Composite composite;
private Shape clip;
private Font font = new Font("Serif", Font.PLAIN, 12);
private static final String rootKey = JAVAGraphics2D.class.getName();
public static final String PACKAGE_NAME = rootKey + ".PackageName";
/**
* if set to true image in the resulting .java file
* are referenced by complete path of creation,
* default false
*/
public static final String COMPLETE_IMAGE_PATHS = rootKey + ".CompleteImagePath";
/**
* if set to true images are stored as byte[] inside the .java file,
* default false.
* Setting this option to true can lead to a not compilable .java file
* because of the its size.
*/
public static final String EMBED_IMAGES = rootKey + ".EmbedImages";
private static final UserProperties defaultProperties = new UserProperties();
/**
* file name prefix for external images include the full path
*/
private final static String imagePrefix = "-image-";
/**
* Path to store the class and its images in with a "/" at the end
*/
private String classPath;
static {
defaultProperties.setProperty(PACKAGE_NAME, "");
defaultProperties.setProperty(COMPLETE_IMAGE_PATHS, false);
defaultProperties.setProperty(EMBED_IMAGES, false);
}
public static Properties getDefaultProperties() {
return defaultProperties;
}
public static void setDefaultProperties(Properties newProperties) {
defaultProperties.setProperties(newProperties);
}
public final static String version = "$Revision: 12618 $";
public JAVAGraphics2D(File file, Dimension size)
throws FileNotFoundException {
this(new FileOutputStream(file), size);
init(file);
}
public JAVAGraphics2D(File file, Component component)
throws FileNotFoundException {
this(new FileOutputStream(file), component);
init(file);
}
public JAVAGraphics2D(OutputStream os, Dimension size) {
super();
init(os);
width = size.width;
height = size.height;
}
public JAVAGraphics2D(OutputStream os, Component component) {
super();
init(os);
width = component.getWidth();
height = component.getHeight();
font = component.getFont();
color = component.getForeground();
paint = component.getForeground();
backgroundColor = component.getBackground();
}
private void init(File file) {
init();
// determine className
String name = file.getName();
className = name.substring(0, name.lastIndexOf(".java"));
// determine path for external images
classPath = file.getParentFile().getAbsolutePath().replace('\\', '/') + "/";
}
private void init(OutputStream os) {
init();
this.os = os;
vg.put(this, new Integer(vgIndex.getInt()));
bos = new ByteArrayOutputStream();
lineWriter = new LineNumberWriter(new OutputStreamWriter(bos));
lineWriter.setLineNumber(1);
out = new IndentPrintWriter(lineWriter);
out.setIndentString(" ");
try {
lineWriter.addLineNumberListener(this, MAX_LINES_PER_METHOD);
} catch (TooManyListenersException tmle) {
System.err.println(tmle);
}
}
private void init() {
initProperties(getDefaultProperties());
isDeviceIndependent = false;
composite = AlphaComposite.getInstance(AlphaComposite.SRC_OVER);
}
protected JAVAGraphics2D(JAVAGraphics2D graphics) {
vg = graphics.vg;
vgIndex = graphics.vgIndex;
imports = graphics.imports;
paintSequenceNo = graphics.paintSequenceNo;
blockLevel = graphics.blockLevel;
properties = graphics.properties;
width = graphics.width;
height = graphics.height;
className = graphics.className;
os = graphics.os;
bos = graphics.bos;
out = graphics.out;
backgroundColor = graphics.backgroundColor;
color = graphics.color;
paint = graphics.paint;
creator = graphics.creator;
colorMode = graphics.colorMode;
stroke = graphics.stroke;
transform = graphics.transform;
hints = graphics.hints;
isDeviceIndependent = graphics.isDeviceIndependent;
composite = graphics.composite;
clip = graphics.clip;
font = graphics.font;
vgIndex.set(vgIndex.getInt() + 1);
vg.put(this, new Integer(vgIndex.getInt()));
}
public void setProperties(Properties newProperties) {
if (newProperties == null)
return;
properties.setProperties(newProperties);
}
protected void initProperties(Properties defaults) {
properties = new UserProperties();
properties.setProperties(defaults);
}
public Properties getProperties() {
return properties;
}
public String getProperty(String key) {
return properties.getProperty(key);
}
public Color getPropertyColor(String key) {
return properties.getPropertyColor(key);
}
public Rectangle getPropertyRectangle(String key) {
return properties.getPropertyRectangle(key);
}
public Insets getPropertyInsets(String key) {
return properties.getPropertyInsets(key);
}
public Dimension getPropertyDimension(String key) {
return properties.getPropertyDimension(key);
}
public int getPropertyInt(String key) {
return properties.getPropertyInt(key);
}
public double getPropertyDouble(String key) {
return properties.getPropertyDouble(key);
}
public boolean isProperty(String key) {
return properties.isProperty(key);
}
public void clearRect(int x, int y, int width, int height) {
out.println(vg() + ".clearRect(" + x + ", " + y + ", " + width + ", "
+ height + ");");
}
public void clipRect(int x, int y, int width, int height) {
out.println(vg() + ".clipRect(" + x + ", " + y + ", " + width + ", "
+ height + ");");
clip = new Rectangle(x, y, width, height);
}
public void copyArea(int x, int y, int width, int height, int dx, int dy) {
out.println(vg() + ".copyArea(" + x + ", " + y + ", " + width + ", "
+ height + ", " + dx + ", " + dy + ");");
}
public Graphics create() {
JAVAGraphics2D g = new JAVAGraphics2D(this);
out.println(g.vg() + " = (VectorGraphics)" + vg() + ".create();");
return g;
}
public Graphics create(int x, int y, int width, int height) {
JAVAGraphics2D g = new JAVAGraphics2D(this);
out.println(g.vg() + " = (VectorGraphics)" + vg() + ".create(" + x
+ ", " + y + ", " + width + ", " + height + ");");
return g;
}
public Graphics create(double x, double y, double width, double height) {
JAVAGraphics2D g = new JAVAGraphics2D(this);
out.println(g.vg() + " = (VectorGraphics)" + vg() + ".create(" + x
+ ", " + y + ", " + width + ", " + height + ");");
return g;
}
public void dispose() {
out.println(vg() + ".dispose();");
}
public void draw3DRect(int x, int y, int width, int height, boolean raised) {
out.println(vg() + ".draw3DRect(" + x + ", " + y + ", " + width + ", "
+ height + ", " + raised + ");");
}
public void fill3DRect(int x, int y, int width, int height, boolean raised) {
out.println(vg() + ".fill3DRect(" + x + ", " + y + ", " + width + ", "
+ height + ", " + raised + ");");
}
public void drawArc(int x, int y, int width, int height, int startAngle,
int arcAngle) {
out.println(vg() + ".drawArc(" + x + ", " + y + ", " + width + ", "
+ height + ", " + startAngle + ", " + arcAngle + ");");
}
public void fillArc(int x, int y, int width, int height, int startAngle,
int arcAngle) {
out.println(vg() + ".drawArc(" + x + ", " + y + ", " + width + ", "
+ height + ", " + startAngle + ", " + arcAngle + ");");
}
public void drawBytes(byte[] data, int offset, int length, int x, int y) {
out.print(vg() + ".drawBytes(");
write(data, offset + length);
out.println(", " + offset + ", " + length + ", " + x + ", " + y + ");");
}
public void drawChars(char[] data, int offset, int length, int x, int y) {
block();
out.print(vg() + ".drawChars(");
write(data, offset + length);
unblock();
out.println(", " + offset + ", " + length + ", " + x + ", " + y + ");");
}
public boolean drawImage(Image image, int x, int y, ImageObserver observer) {
block();
out.print(vg() + ".drawImage(");
write(image);
unblock();
out.println(", " + x + ", " + y + ", " + "null" + ");");
return true;
}
public boolean drawImage(Image image, int x, int y, int width, int height,
ImageObserver observer) {
block();
out.print(vg() + ".drawImage(");
write(image);
unblock();
out.println(", " + x + ", " + y + ", " + width + ", " + height + ", "
+ "null" + ");");
return true;
}
public boolean drawImage(Image image, int x, int y, Color bgColor,
ImageObserver observer) {
block();
out.print(vg() + ".drawImage(");
write(image);
out.print(", " + x + ", " + y + ", ");
write(bgColor);
unblock();
out.println(", " + "null" + ");");
return true;
}
public boolean drawImage(Image image, int x, int y, int width, int height,
Color bgColor, ImageObserver observer) {
block();
out.print(vg() + ".drawImage(");
write(image);
out.print(", " + x + ", " + y + ", " + width + ", " + height + ", ");
write(bgColor);
unblock();
out.println(", " + "null" + ");");
return true;
}
public boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2,
int sx1, int sy1, int sx2, int sy2, ImageObserver observer) {
block();
out.print(vg() + ".drawImage(");
write(image);
out.print(", " + dx1 + ", " + dy1 + ", " + dx2 + ", " + dy2);
out.print(", " + sx1 + ", " + sy1 + ", " + sx2 + ", " + sy2);
unblock();
out.println(", " + "null" + ");");
return true;
}
public boolean drawImage(Image image, int dx1, int dy1, int dx2, int dy2,
int sx1, int sy1, int sx2, int sy2, Color bgColor,
ImageObserver observer) {
block();
out.print(vg() + ".drawImage(");
write(image);
out.print(", " + dx1 + ", " + dy1 + ", " + dx2 + ", " + dy2);
out.print(", " + sx1 + ", " + sy1 + ", " + sx2 + ", " + sy2 + ", ");
write(bgColor);
unblock();
out.println(", " + "null" + ");");
return true;
}
public void drawLine(int x1, int y1, int x2, int y2) {
out.println(vg() + ".drawLine(" + x1 + ", " + y1 + ", " + x2 + ", "
+ y2 + ");");
}
public void drawOval(int x, int y, int width, int height) {
out.println(vg() + ".drawOval(" + x + ", " + y + ", " + width + ", "
+ height + ");");
}
public void fillOval(int x, int y, int width, int height) {
out.println(vg() + ".fillOval(" + x + ", " + y + ", " + width + ", "
+ height + ");");
}
public void drawPolygon(int[] xPoints, int[] yPoints, int nPoints) {
block();
out.print(vg() + ".drawPolygon(");
write(xPoints);
out.print(", ");
write(yPoints);
unblock();
out.println(", " + nPoints + ");");
}
public void fillPolygon(int[] xPoints, int[] yPoints, int nPoints) {
block();
out.print(vg() + ".fillPolygon(");
write(xPoints);
out.print(", ");
write(yPoints);
unblock();
out.println(", " + nPoints + ");");
}
public void drawPolygon(Polygon p) {
block();
out.print(vg() + ".drawPolygon(");
write(p);
unblock();
out.println(");");
}
public void fillPolygon(Polygon p) {
block();
out.print(vg() + ".fillPolygon(");
write(p);
unblock();
out.println(");");
}
public void drawPolyline(int[] xPoints, int[] yPoints, int nPoints) {
block();
out.print(vg() + ".drawPolyline(");
write(xPoints);
out.print(", ");
write(yPoints);
unblock();
out.println(", " + nPoints + ");");
}
public void drawRect(int x, int y, int width, int height) {
out.println(vg() + ".drawRect(" + x + ", " + y + ", " + width + ", "
+ height + ");");
}
public void fillRect(int x, int y, int width, int height) {
out.println(vg() + ".fillRect(" + x + ", " + y + ", " + width + ", "
+ height + ");");
}
public void drawRoundRect(int x, int y, int width, int height,
int arcWidth, int arcHeight) {
out.println(vg() + ".drawRoundRect(" + x + ", " + y + ", " + width
+ ", " + height + ", " + arcWidth + ", " + arcHeight + ");");
}
public void fillRoundRect(int x, int y, int width, int height,
int arcWidth, int arcHeight) {
out.println(vg() + ".fillRoundRect(" + x + ", " + y + ", " + width
+ ", " + height + ", " + arcWidth + ", " + arcHeight + ");");
}
public void drawString(AttributedCharacterIterator iterator, int x, int y) {
drawString(iterator, (float)x, (float)y);
}
public void drawString(String str, int x, int y) {
block();
out.print(vg() + ".drawString(");
write(str);
unblock();
out.println(", " + x + ", " + y + ");");
}
public void finalize() {
out.println(vg() + ".finalize();");
super.finalize();
}
public Shape getClip() {
return clip;
}
public Rectangle getClipBounds() {
return (clip == null) ? null : clip.getBounds();
}
public Rectangle getClipBounds(Rectangle r) {
Rectangle c = getClipBounds();
if (c != null) {
r.x = c.x;
r.y = c.y;
r.width = c.width;
r.height = c.height;
}
return r;
}
/**
* @deprecated probably forwards to getClipBounds()
*/
// public Rectangle getClipRect() {
// return null;
// }
public Color getColor() {
return color;
}
public Font getFont() {
return font;
}
public FontMetrics getFontMetrics() {
return getFontMetrics(getFont());
}
/**
* @param font
* @deprecated
*/
public FontMetrics getFontMetrics(Font font) {
return Toolkit.getDefaultToolkit().getFontMetrics(font);
}
public boolean hitClip(int x, int y, int width, int height) {
return clip.intersects(x, y, width, height);
}
public void setClip(int x, int y, int width, int height) {
out.println(vg() + ".setClip(" + x + ", " + y + ", " + width + ", "
+ height + ");");
clip = new Rectangle(x, y, width, height);
}
public void setClip(Shape clip) {
block();
out.print(vg() + ".setClip(");
write(clip);
unblock();
out.println(");");
this.clip = clip;
}
public void setColor(Color c) {
block();
out.print(vg() + ".setColor(");
write(c);
unblock();
out.println(");");
color = c;
}
public void setFont(Font font) {
block();
out.print(vg() + ".setFont(");
write(font);
unblock();
out.println(");");
this.font = font;
}
public void setPaintMode() {
out.println(vg() + ".setPaintMode();");
}
public void setXORMode(Color c1) {
block();
out.print(vg() + ".setXORMode(");
write(c1);
unblock();
out.println(");");
}
public String toString() {
return "JavaGraphics2D";
}
public void translate(int x, int y) {
out.println(vg() + ".translate(" + x + ", " + y + ");");
}
public void addRenderingHints(Map hints) {
// store hints
hints.putAll(hints);
// write hints out
out.print(vg() + ".addRenderingHints(");
writeHintMap(hints);
out.println(");");
}
public void clip(Shape s) {
block();
out.print(vg() + ".clip(");
write(s);
unblock();
out.println(");");
clip = s;
}
public void draw(Shape s) {
block();
out.print(vg() + ".draw(");
write(s);
unblock();
out.println(");");
}
public void drawGlyphVector(GlyphVector g, float x, float y) {
fill(g.getOutline(x, y));
}
public void drawImage(BufferedImage img, BufferedImageOp op, int x, int y) {
if (op instanceof AffineTransformOp) {
out.print(vg() + ".drawImage(");
out.indent();
write(img);
out.println(",");
write((AffineTransformOp)op);
out.println(",");
out.println(x + ", " + y + ");");
out.outdent();
} else if (op instanceof ConvolveOp) {
out.print(vg() + ".drawImage(");
out.indent();
write(img);
out.println(",");
write((ConvolveOp)op);
out.println(",");
out.println(x + ", " + y + ");");
out.outdent();
} else {
out.println(
"System.err.println(\""
+ getClass()
+ ": drawImage(BufferedImage, BufferedImageOp, int, int) not implemented.\");");
}
}
private void write(ConvolveOp op) {
if (op == null) {
out.print("null");
return;
}
imports.add("java.awt.image.ConvolveOp");
out.print("new ConvolveOp(");
write(op.getKernel());
out.print(", ");
out.print(op.getEdgeCondition());
out.print(", ");
if (op.getRenderingHints() != null) {
out.print("new RenderingHints(");
writeHintMap(op.getRenderingHints());
out.print(")");
} else {
out.print("null");
}
out.print(")");
}
private void writeHintMap(Map hints) {
if (hints == null) {
out.print("null");
return;
}
imports.add("org.freehep.graphicsio.java.JAVAArrayMap");
out.print("new JAVAArrayMap(new Object[] {");
Iterator keys = hints.keySet().iterator();
while(keys.hasNext()) {
Object key = keys.next();
String keyString = (String) JAVAArrayMap.HINTS.get(key);
if (keyString == null) {
continue;
}
Object value = hints.get(key);
String valueString = (String) JAVAArrayMap.HINTS.get(value);
if (valueString == null) {
continue;
}
out.print(keyString);
out.print(", ");
out.print(valueString);
if (keys.hasNext()) {
out.print(", ");
}
}
out.print("})");
}
private void write(Kernel kernel) {
imports.add("java.awt.image.Kernel");
out.print("new Kernel(");
out.print(kernel.getWidth());
out.print(", ");
out.print(kernel.getHeight());
out.print(", ");
write(kernel.getKernelData(null));
out.print(")");
}
private void write(AffineTransformOp op) {
imports.add("java.awt.image.AffineTransformOp");
out.print("new AffineTransformOp(");
write(op.getTransform());
out.print(", ");
out.print(op.getInterpolationType());
out.print(")");
}
public boolean drawImage(Image img, AffineTransform xform, ImageObserver obs) {
out.println(vg() + ".drawImage(");
out.indent();
write(img);
out.println(",");
write(xform);
out.println(",");
out.println("null);");
out.outdent();
return true;
}
public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
out
.println("System.err.println(\""
+ getClass()
+ ": drawRenderableImage(RenderableImage, AffineTransform) not implemented.\");");
}
public void drawRenderedImage(RenderedImage img, AffineTransform xform) {
out
.println("System.err.println(\""
+ getClass()
+ ": drawRenderedImage(RenderedImage, AffineTransform) not implemented.\");");
}
/**
* converts all textAttributes in the AttributedCharacterIterator
* to a java-line that adds this attribute to an AttributedString.
* To avoid double Attributes this method stores the lines in a
* HashSet and returns them to
* {@link #drawString(java.text.AttributedCharacterIterator, float, float)}.
* To do so the IndentPrintWriter out for this object is temporary
* redirected to an IndentPrintWriter of this method.
*
* @param iterator the AttributedCharacterIterator
* @param imports list of imported classes
* @param text will be filled with chars from the iterator
* @return HashSet with entries like "addAttribute(TextAttribute.FONT, new Font("Arial", 11f), 10, 20)"
*/
private HashSet getAttributes(
AttributedCharacterIterator iterator,
HashSet imports,
StringBuffer text) {
// return this later
HashSet result = new HashSet(0);
// iterate the Characters
for (
char c = iterator.first();
c != AttributedCharacterIterator.DONE;
c = iterator.next()) {
// append the char
text.append(c);
Map /**/ attributes = iterator.getAttributes();
Iterator /**/ keys = attributes.keySet().iterator();
while (keys.hasNext()) {
StringBuffer attribute = new StringBuffer();
// define key and value
AttributedCharacterIterator.Attribute key =
(AttributedCharacterIterator.Attribute) keys.next();
Object value = attributes.get(key);
String className = key.getClass().getName();
attribute.append(".addAttribute(");
attribute.append(className.substring(className.lastIndexOf(".") + 1));
attribute.append(".");
imports.add(className);
// taken from Attribute.toString() toString is
// getClass().getName() + "(" + name + ")";
String keyName = key.toString().substring(
key.toString().lastIndexOf("(") + 1,
key.toString().lastIndexOf(")"));
attribute.append(keyName.toUpperCase());
attribute.append(", ");
// redirect the output
IndentPrintWriter old = out;
StringWriter s = new StringWriter(0);
out = new IndentPrintWriter(s);
// write out the value
if (value instanceof String || value == null) {
write((String)value);
} else if (value instanceof Float) {
write((Float)value);
} else if (value instanceof Double) {
write((Double)value);
} else if (value instanceof Integer) {
write((Integer)value);
} else if (value instanceof Byte) {
write((Byte)value);
} else if (value instanceof Boolean) {
write((Boolean)value);
} else if (value instanceof Paint) {
// FIXME: TexturePaint writes multiple images
// even so they can't be changed between calls of this method
write((Paint)value);
} else if (value instanceof Dimension) {
write((Dimension)value);
} else if (value instanceof AffineTransform) {
write((AffineTransform)value);
} else if (value instanceof Font) {
write((Font)value);
} else if (value instanceof ImageGraphicAttribute) {
write((ImageGraphicAttribute)value);
} else if (value instanceof ShapeGraphicAttribute) {
write((ShapeGraphicAttribute)value);
} else {
write(value.toString());
}
// write content of out
out.close();
attribute.append(s.getBuffer());
// redirect out to old IndentPrintWriter
out = old;
// append the range of the TextAttribute
attribute.append(", ");
attribute.append(iterator.getRunStart(key));
attribute.append(", ");
attribute.append(iterator.getRunLimit(key));
attribute.append(");");
// store the result
result.add(attribute.toString());
}
}
// return all lines of code
return result;
}
/**
* needed to create unique instances of AttributedString
*/
private static int attributedStringCounter = 0;
/**
* Creates an Java-output using an AttributedString.
* Each textAttribute is added to this one.
*
* @param iterator String with TextAttributes
* @param x x-position for drawing
* @param y y-position for drawing
*/
public void drawString(
AttributedCharacterIterator iterator,
float x,
float y) {
imports.add("java.text.AttributedString");
// define a name for an AttributedString
String asName = "as" + (attributedStringCounter++);
// filled by {@link #getAttributes()}
StringBuffer attributeName = new StringBuffer();
HashSet attributeImports = new HashSet(0);
// get Attributes and fill attributeName and attributeImports
Iterator attributes = getAttributes(
iterator,
attributeImports,
attributeName).iterator();
// add the collected imports
imports.addAll(attributeImports);
// write something like:
// AttributedString as243 = new AttributedString("attributed_text");
out.print("AttributedString ");
out.print(asName);
out.print("= new AttributedString(\"");
out.print(attributeName.toString());
out.println("\");");
// add all TextAttributes by writing the attribute lines of code
while (attributes.hasNext()) {
out.print(asName);
out.println(attributes.next());
}
// write something like:
// vg[0].drawString(as243, 23, 24);
out.print(vg());
out.print(".drawString(");
out.print(asName);
out.print(".getIterator(), ");
out.print(x);
out.print("f, ");
out.print(y);
out.println("f);");
}
private void write(Boolean b) {
if (b.booleanValue()) {
out.print("Boolean.TRUE");
} else {
out.print("Boolean.FALSE");
}
}
private void write(Byte b) {
out.print("new Byte(");
out.print(b.byteValue());
out.print("b)");
}
private void write(Float f) {
out.print("new Float(");
out.print(f.floatValue());
out.print("f)");
}
private void write(Double d) {
out.print("new Double(");
out.print(d.doubleValue());
out.print(")");
}
private void write(Integer i) {
out.print("new Integer(");
out.print(i.intValue());
out.print(")");
}
private void write(Dimension d) {
imports.add("java.awt.Dimension");
out.print("new Dimension(");
out.print(d.getWidth());
out.print(", ");
out.print(d.getHeight());
out.print(")");
}
private void write(ImageGraphicAttribute iga) {
// ImageGraphicAttribute has no getImage() so
// it can't be fully supported
imports.add("java.awt.font.ImageGraphicAttribute");
out.print("new ImageGraphicAttribute(");
write(new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB));
out.print("/* ImageGraphicAttribute.getImage() not supported */");
out.print(", ");
out.print(iga.getAlignment());
out.print(", ");
out.print(- iga.getBounds().getX());
out.print(", ");
out.print(- iga.getBounds().getY());
out.print(")");
}
private void write(ShapeGraphicAttribute sga) {
// ShapeGraphicAttribute has no getShape()
// and getStroke() so it can't be fully supported
imports.add("java.awt.font.ShapeGraphicAttribute");
out.print("new ShapeGraphicAttribute(");
write(sga.getBounds().getBounds2D());
out.print("/* ShapeGraphicAttribute.getShape() not supported */");
out.print(", ");
out.print(sga.getAlignment());
out.print(", ");
write(new BasicStroke());
out.print("/* ShapeGraphicAttribute.getStroke() not supported */");
out.print(")");
}
public void drawString(String str, float x, float y) {
block();
out.print(vg() + ".drawString(");
write(str);
unblock();
out.println(", " + x + ", " + y + ");");
}
public void fill(Shape s) {
block();
out.print(vg() + ".fill(");
write(s);
unblock();
out.println(");");
}
public Color getBackground() {
return backgroundColor;
}
public Composite getComposite() {
return composite;
}
public GraphicsConfiguration getDeviceConfiguration() {
// FIXME
return null;
}
public FontRenderContext getFontRenderContext() {
return new FontRenderContext(new AffineTransform(), false, false);
}
public Paint getPaint() {
return paint;
}
public Object getRenderingHint(RenderingHints.Key key) {
return hints.get(key);
}
public RenderingHints getRenderingHints() {
return hints;
}
public Stroke getStroke() {
return stroke;
}
public AffineTransform getTransform() {
return transform;
}
public boolean hit(Rectangle rect, Shape s, boolean onStroke) {
out.println("System.err.println(\"" + getClass()
+ ": hit(Rectangle, Shape, boolean) not implemented.\");");
return false;
}
public void rotate(double theta) {
out.println(vg() + ".rotate(" + theta + ");");
}
public void rotate(double theta, double x, double y) {
out.println(vg() + ".rotate(" + theta + ", " + x + ", " + y + ");");
}
public void scale(double sx, double sy) {
out.println(vg() + ".scale(" + sx + ", " + sy + ");");
}
public void setBackground(Color c) {
block();
out.print(vg() + ".setBackground(");
write(c);
unblock();
out.println(");");
backgroundColor = c;
}
public void setComposite(Composite c) {
if (c instanceof AlphaComposite) {
block();
out.print(vg() + ".setComposite(");
write((AlphaComposite) c);
unblock();
out.println(");");
} else {
out.println("System.err.println(\"" + getClass()
+ ": setComposite(Composite) not implemented.\");");
}
composite = c;
}
public void setPaint(Paint p) {
block();
out.print(vg() + ".setPaint(");
write(p);
unblock();
out.println(");");
paint = p;
}
public void setRenderingHint(RenderingHints.Key hintKey, Object hintValue) {
// store hints
if (hintValue != null) {
hints.put(hintKey, hintValue);
} else {
hints.remove(hintKey);
}
// RenderingHints --> String
String key = (String) JAVAArrayMap.HINTS.get(hintKey);
if (key == null) {
out.println("System.err.println(\"" + getClass()
+ ": setRenderingHint(RenderingHints.Key, Object) key not supported '"
+ hintKey + "'.\");");
return;
}
String value = (String) JAVAArrayMap.HINTS.get(hintValue);
if (value == null) {
out.println("System.err.println(\"" + getClass()
+ ": setRenderingHint(RenderingHints.Key, Object) key not supported '"
+ hintKey + "'.\");");
return;
}
// write out
imports.add("java.awt.RenderingHints");
out.print(vg() + ".setRenderingHint(");
out.print(key);
out.print(", ");
out.print(value);
out.println(");");
}
public void setRenderingHints(Map hints) {
this.hints = new RenderingHints(hints);
// write them out
out.print(vg() + ".setRenderingHints(");
writeHintMap(hints);
out.println(");");
}
public void setStroke(Stroke s) {
if (s instanceof BasicStroke) {
block();
out.print(vg() + ".setStroke(");
write((BasicStroke) s);
unblock();
out.println(");");
} else {
out.println("System.err.println(\"" + getClass()
+ ": setStroke(Stroke) not implemented.\");");
}
stroke = s;
}
public void setTransform(AffineTransform xform) {
block();
out.print(vg() + ".setTransform(");
write(xform);
unblock();
out.println(");");
}
public void shear(double shx, double shy) {
out.println(vg() + ".shear(" + shx + ", " + shy + ");");
}
public void transform(AffineTransform xform) {
block();
out.print(vg() + ".transform(");
write(xform);
unblock();
out.println(");");
}
public void translate(double tx, double ty) {
out.println(vg() + ".translate(" + tx + ", " + ty + ");");
}
public void clearRect(double x, double y, double width, double height) {
out.println(vg() + ".clearRect(" + x + ", " + y + ", " + width + ", "
+ height + ");");
}
public void clipRect(double x, double y, double width, double height) {
out.println(vg() + ".clipRect(" + x + ", " + y + ", " + width + ", "
+ height + ");");
clip = new Rectangle2D.Double(x, y, width, height);
}
public void drawArc(double x, double y, double width, double height,
double startAngle, double arcAngle) {
out.println(vg() + ".drawArc(" + x + ", " + y + ", " + width + ", "
+ height + ", " + startAngle + ", " + arcAngle + ");");
}
public void drawLine(double x1, double y1, double x2, double y2) {
out.println(vg() + ".drawLine(" + x1 + ", " + y1 + ", " + x2 + ", "
+ y2 + ");");
}
public void drawOval(double x, double y, double width, double height) {
out.println(vg() + ".drawOval(" + x + ", " + y + ", " + width + ", "
+ height + ");");
}
public void drawPolygon(double[] xPoints, double[] yPoints, int nPoints) {
block();
out.print(vg() + ".drawPolygon(");
write(xPoints);
out.print(", ");
write(yPoints);
unblock();
out.println(", " + nPoints + ");");
}
public void drawPolyline(double[] xPoints, double[] yPoints, int nPoints) {
block();
out.print(vg() + ".drawPolyline(");
write(xPoints);
out.print(", ");
write(yPoints);
unblock();
out.println(", " + nPoints + ");");
}
public void drawRect(double x, double y, double width, double height) {
out.println(vg() + ".drawRect(" + x + ", " + y + ", " + width + ", "
+ height + ");");
}
public void drawRoundRect(double x, double y, double width, double height,
double arcWidth, double arcHeight) {
out.println(vg() + ".drawRoundRect(" + x + ", " + y + ", " + width
+ ", " + height + ", " + arcWidth + ", " + arcHeight + ");");
}
public void drawSymbol(int x, int y, int size, int symbol) {
out.println(vg() + ".drawSymbol(" + x + ", " + y + ", " + size + ", "
+ symbol + ");");
}
public void fillAndDrawSymbol(int x, int y, int size, int symbol,
Color fillColor) {
// FIXME
}
public void drawSymbol(double x, double y, double size, int symbol) {
out.println(vg() + ".drawSymbol(" + x + ", " + y + ", " + size + ", "
+ symbol + ");");
}
public void fillSymbol(int x, int y, int size, int symbol) {
out.println(vg() + ".fillSymbol(" + x + ", " + y + ", " + size + ", "
+ symbol + ");");
}
public void fillSymbol(double x, double y, double size, int symbol) {
out.println(vg() + ".fillSymbol(" + x + ", " + y + ", " + size + ", "
+ symbol + ");");
}
public void fillAndDrawSymbol(double x, double y, double size, int symbol,
Color fillColor) {
// FIXME
}
public void drawString(String str, double x, double y) {
block();
out.print(vg() + ".drawString(");
write(str);
unblock();
out.println(", " + x + ", " + y + ");");
}
public void drawString(TagString str, double x, double y) {
block();
out.print(vg() + ".drawString(");
write(str);
unblock();
out.println(", " + x + ", " + y + ");");
}
public void drawString(String str, double x, double y, int horizontal,
int vertical) {
block();
out.print(vg() + ".drawString(");
write(str);
unblock();
out.println(", " + x + ", " + y + ", " + horizontal + ", " + vertical
+ ");");
}
public void drawString(TagString str, double x, double y, int horizontal,
int vertical) {
block();
out.print(vg() + ".drawString(");
write(str);
unblock();
out.println(", " + x + ", " + y + ", " + horizontal + ", " + vertical
+ ");");
}
public void drawString(String str, double x, double y, int horizontal,
int vertical, boolean framed, Color frameColor, double frameWidth,
boolean banner, Color bannerColor) {
block();
out.print(vg() + ".drawString(");
write(str);
out.print(", " + x + ", " + y + ", " + horizontal + ", " + vertical
+ ", " + framed + ", ");
write(frameColor);
out.print(", " + frameWidth + ", " + banner + ", ");
write(bannerColor);
unblock();
out.println(");");
}
public void drawString(TagString str, double x, double y, int horizontal,
int vertical, boolean framed, Color frameColor, double frameWidth,
boolean banner, Color bannerColor) {
block();
out.print(vg() + ".drawString(");
write(str);
out.print(", " + x + ", " + y + ", " + horizontal + ", " + vertical
+ ", " + framed + ", ");
write(frameColor);
out.print(", " + frameWidth + ", " + banner + ", ");
write(bannerColor);
unblock();
out.println(");");
}
public void fillAndDraw(Shape s, Color fillColor) {
block();
out.print(vg() + ".fillAndDraw(");
write(s);
out.print(", ");
write(fillColor);
unblock();
out.println(");");
}
public void fillArc(double x, double y, double width, double height,
double startAngle, double arcAngle) {
out.println(vg() + ".fillArc(" + x + ", " + y + ", " + width + ", "
+ height + ", " + startAngle + ", " + arcAngle + ");");
}
public void fillOval(double x, double y, double width, double height) {
out.println(vg() + ".fillOval(" + x + ", " + y + ", " + width + ", "
+ height + ");");
}
public void fillPolygon(double[] xPoints, double[] yPoints, int nPoints) {
block();
out.print(vg() + ".fillPolygon(");
write(xPoints);
out.print(", ");
write(yPoints);
unblock();
out.println(", " + nPoints + ");");
}
public void fillRect(double x, double y, double width, double height) {
out.println(vg() + ".fillRect(" + x + ", " + y + ", " + width + ", "
+ height + ");");
}
public void fillRoundRect(double x, double y, double width, double height,
double arcWidth, double arcHeight) {
out.println(vg() + ".fillRoundRect(" + x + ", " + y + ", " + width
+ ", " + height + ", " + arcWidth + ", " + arcHeight + ");");
}
public int getColorMode() {
return colorMode;
}
public String getCreator() {
return creator;
}
public boolean isDeviceIndependent() {
return false;
}
public void printComment(String comment) {
block();
out.print(vg() + ".printComment(");
write(comment);
unblock();
out.println(");");
}
public void setClip(double x, double y, double width, double height) {
out.println(vg() + ".setClip(" + x + ", " + y + ", " + width + ", "
+ height + ");");
clip = new Rectangle2D.Double(x, y, width, height);
}
public void setColorMode(int colorMode) {
out.println(vg() + ".setColorMode(" + colorMode + ");");
this.colorMode = colorMode;
}
public void setCreator(String creator) {
if (creator != null) {
this.creator = creator;
}
}
public void setDeviceIndependent(boolean isDeviceIndependent) {
this.isDeviceIndependent = true;
}
public void setLineWidth(int width) {
out.println(vg() + ".setLineWidth(" + width + ");");
}
public void setLineWidth(double width) {
out.println(vg() + ".setLineWidth(" + width + ");");
}
public void startExport() {
block();
imports.add("java.awt.Graphics");
imports.add("java.io.IOException");
imports.add("org.freehep.graphics2d.VectorGraphics");
imports.add("org.freehep.graphicsio.test.TestingPanel");
out.println("public class " + className + " extends TestingPanel {");
out.println();
out.indent();
out.println("public " + className
+ "(String[] args) throws Exception {");
out.indent();
out.println("super(args);");
out.print("setName(");
write(className);
out.println(");");
out.outdent();
out.println("} // contructor");
out.println();
out.println("public void paint(Graphics g) {");
out.indent();
out.println("vg[0] = VectorGraphics.create(g);");
out.print("vg[0].setCreator(");
write(creator);
out.println(");");
out.println("try {");
out.indent();
out.println("Paint0s" + paintSequenceNo.getInt() + ".paint(vg);");
out.outdent();
out.println("} catch (IOException e) {");
out.indent();
out.println("e.printStackTrace();");
out.outdent();
out.println("}");
out.outdent();
out.println("} // paint");
out.println();
startClass();
unblock();
}
public void endExport() {
block();
endClass();
out.println("private VectorGraphics vg[] = new VectorGraphics["
+ vg.size() + "];");
out.println();
out
.println("public static void main(String[] args) throws Exception {");
out.indent();
out.println("new " + className + "(args).runTest(" + width + ", "
+ height + ");");
out.outdent();
out.println("}");
out.outdent();
out.println("} // class");
out.close();
unblock();
// now write the header
PrintWriter writer = new PrintWriter(os);
writer.println("// AUTOMATICALLY GENERATED by " + creator);
writer.println();
if ((getProperty(PACKAGE_NAME) != null)
&& !getProperty(PACKAGE_NAME).equals("")) {
writer.println("package " + getProperty(PACKAGE_NAME) + ";");
writer.println();
}
for (Iterator i=imports.iterator(); i.hasNext(); ) {
writer.println("import "+i.next()+";");
}
writer.println();
// and the buffer
writer.print(bos.toString());
writer.close();
}
public void lineNumberReached(LineNumberWriter.LineNumberEvent event) {
if (!block()) {
lineWriter.setLineNumber(1);
out.println(
"Paint0s" + (paintSequenceNo.getInt() + 1) + ".paint(vg);");
endClass();
paintSequenceNo.set(paintSequenceNo.getInt() + 1);
startClass();
}
unblock();
}
private boolean block() {
boolean blocked = blockLevel.getInt() > 0;
blockLevel.set(blockLevel.getInt() + 1);
return blocked;
}
private void unblock() {
if (blockLevel.getInt() > 0)
blockLevel.set(blockLevel.getInt() - 1);
}
private void startClass() {
block();
out.println("private static class Paint0s" + paintSequenceNo.getInt()
+ " {");
out.indent();
out.println("public static void paint(VectorGraphics[] vg) throws IOException {");
out.indent();
unblock();
}
private void endClass() {
block();
out.outdent();
out.println("} // paint");
out.outdent();
out.println("} // class Paint0s" + paintSequenceNo.getInt());
out.println();
unblock();
}
//
// Private Methods to write objects
//
private void write(Color c) {
if (c == null) {
out.print("null");
return;
}
imports.add("java.awt.Color");
out.print("new Color(" + c.getRed() + ", " + c.getGreen() + ", "
+ c.getBlue() + ", " + c.getAlpha() + ")");
}
private void write(Font font) {
if (font == null) {
out.print("null");
return;
}
imports.add("java.awt.Font");
out.print("new Font(");
write(font.getName());
out.print(", " + font.getStyle() + ", " + font.getSize() + ")");
}
private void write(AffineTransform t) {
if (t == null) {
out.print("null");
return;
}
double[] m = new double[6];
t.getMatrix(m);
imports.add("java.awt.geom.AffineTransform");
out.print("new AffineTransform(" + m[0] + ", " + m[1] + ", " + m[2]
+ ", " + m[3] + ", " + m[4] + ", " + m[5] + ")");
}
private void write(Shape s) {
if (s == null) {
out.print("null");
return;
}
PathIterator i = s.getPathIterator(null);
imports.add("org.freehep.graphicsio.java.JAVAGeneralPath");
out.println("new JAVAGeneralPath(" + i.getWindingRule()
+ ", new JAVAGeneralPath.PathElement[] {");
out.indent();
float[] c = new float[6];
while (!i.isDone()) {
int type = i.currentSegment(c);
switch (type) {
case PathIterator.SEG_MOVETO:
out.print("new JAVAGeneralPath.MoveTo(" + c[0] + "f, " + c[1]
+ "f)");
break;
case PathIterator.SEG_LINETO:
out.print("new JAVAGeneralPath.LineTo(" + c[0] + "f, " + c[1]
+ "f)");
break;
case PathIterator.SEG_CUBICTO:
out.print("new JAVAGeneralPath.CurveTo(" + c[0] + "f, " + c[1]
+ "f, " + c[2] + "f, " + c[3] + "f, " + c[4] + "f, "
+ c[5] + "f)");
break;
case PathIterator.SEG_QUADTO:
out.print("new JAVAGeneralPath.QuadTo(" + c[0] + "f, " + c[1]
+ "f, " + c[2] + "f, " + c[3] + "f)");
break;
case PathIterator.SEG_CLOSE:
out.print("new JAVAGeneralPath.ClosePath()");
break;
default:
break;
}
i.next();
out.println(i.isDone() ? "" : ",");
}
out.outdent();
out.print("})");
}
private void write(double[] a) {
if (a == null) {
out.print("null");
return;
}
write(a, a.length);
}
private void write(double[] a, int length) {
if (a == null) {
out.print("null");
return;
}
out.println("new double[] {");
out.indent();
for (int i = 0; i < length; i++) {
if (i != 0)
out.print(", ");
out.print(a[i]);
}
out.outdent();
out.println();
out.print("}");
}
private void write(float[] a) {
if (a == null) {
out.print("null");
return;
}
write(a, a.length);
}
private void write(float[] a, int length) {
if (a == null) {
out.print("null");
return;
}
out.print("new float[] {");
out.indent();
for (int i = 0; i < length; i++) {
if (i % 10 == 0) {
out.println();
}
if (i != 0) {
out.print(", ");
}
out.print(a[i] + "f");
}
out.outdent();
out.println();
out.print("}");
}
private void write(int[] a) {
if (a == null) {
out.print("null");
return;
}
write(a, a.length);
}
private void write(int[] a, int length) {
if (a == null) {
out.print("null");
return;
}
out.print("new int[] {");
out.indent();
for (int i = 0; i < length; i++) {
if (i % 10 == 0) {
out.println();
}
if (i != 0) {
out.print(", ");
}
out.print(a[i]);
}
out.outdent();
out.println();
out.print("}");
}
private void write(byte[] a) {
if (a == null) {
out.print("null");
return;
}
write(a, a.length);
}
private void write(byte[] a, int length) {
if (a == null) {
out.print("null");
return;
}
out.print("new byte[] {");
out.indent();
for (int i = 0; i < length; i++) {
if (i % 10 == 0) {
out.println();
}
if (i != 0) {
out.print(", ");
}
out.print(a[i]);
}
out.outdent();
out.println();
out.print("}");
}
/*
private void write(char[] a) {
if (a == null) {
out.print("null");
return;
}
write(a, a.length);
}
*/
private void write(char[] a, int length) {
if (a == null) {
out.print("null");
return;
}
out.println("new char[] {");
out.indent();
for (int i = 0; i < length; i++) {
if (i != 0)
out.print(", ");
out.print("'");
switch (a[i]) {
case '\b':
out.print("\\b");
break;
case '\t':
out.print("\\t");
break;
case '\n':
out.print("\\n");
break;
case '\f':
out.print("\\f");
break;
case '\r':
out.print("\\r");
break;
case '\"':
out.print("\\\"");
break;
case '\'':
out.print("\\'");
break;
case '\\':
out.print("\\\\");
break;
default:
out.print(toUnicode(a[i]));
break;
}
out.print("'");
if (i % 10 == 0) {
out.println();
}
}
out.outdent();
out.println();
out.print("}");
}
private void write(Polygon p) {
if (p == null) {
out.print("null");
return;
}
imports.add("java.awt.Polygon");
out.println("new Polygon(");
out.indent();
write(p.xpoints, p.npoints);
out.print(", ");
write(p.ypoints, p.npoints);
out.println(", " + p.npoints);
out.outdent();
out.print(")");
}
private static int imageCounter = 0;
private void write(Image image) {
if (image == null) {
out.print("null");
return;
}
// prepare the image encoder
PNGEncoder encoder = new PNGEncoder(image, true, PNGEncoder.FILTER_NONE, 9);
// embed the image
if (isProperty(EMBED_IMAGES)) {
imports.add("javax.imageio.ImageIO");
imports.add("java.io.ByteArrayInputStream");
out.println("ImageIO.read(new ByteArrayInputStream(");
out.indent();
write(encoder.pngEncode());
out.outdent();
out.print("))");
}
// write as external file
else {
// we do not reuse any written images because
// they could be changed between write operations
// determin path to image
String imageName = className + imagePrefix + (imageCounter ++) + ".png";
if (isProperty(COMPLETE_IMAGE_PATHS)) {
imageName = classPath + imageName;
}
// write the image
try {
FileOutputStream fos = new FileOutputStream(imageName);
BufferedOutputStream bos = new BufferedOutputStream(fos);
bos.write(encoder.pngEncode());
bos.close();
} catch (IOException e) {
e.printStackTrace();
}
imports.add("javax.imageio.ImageIO");
imports.add("java.io.File");
out.print("ImageIO.read(new File(\"" + imageName + "\"))");
}
}
private void write(Paint p) {
if (p == null) {
out.print("(Paint)null");
} else if (p instanceof Color) {
write((Color)p);
} else if (p instanceof TexturePaint) {
write((TexturePaint)p);
} else if (p instanceof GradientPaint) {
write((GradientPaint)p);
} else {
write(Color.red);
out.print("/* not supported '");
out.print(p.toString());
out.print("' */");
}
}
private void write(GradientPaint gp) {
if (gp == null) {
out.print("null");
return;
}
imports.add("java.awt.GradientPaint");
out.println("new GradientPaint(");
out.indent();
write(gp.getPoint1());
out.print(", ");
write(gp.getColor1());
out.println(", ");
write(gp.getPoint2());
out.print(", ");
write(gp.getColor2());
out.println(", " + gp.isCyclic());
out.outdent();
out.print(")");
}
private void write(TexturePaint tp) {
if (tp == null) {
out.print("null");
return;
}
imports.add("java.awt.TexturePaint");
out.println("new TexturePaint(");
out.indent();
write(tp.getImage());
out.print(", ");
write(tp.getAnchorRect());
out.outdent();
out.print(")");
}
private void write(BasicStroke bs) {
if (bs == null) {
out.print("null");
return;
}
imports.add("java.awt.BasicStroke");
out.println("new BasicStroke(");
out.indent();
out.println(bs.getLineWidth() + "f, " + bs.getEndCap() + ", ");
out.println(bs.getLineJoin() + ", " + bs.getMiterLimit() + "f, ");
write(bs.getDashArray());
out.println(", " + bs.getDashPhase() + "f");
out.outdent();
out.print(")");
}
private void write(AlphaComposite ac) {
if (ac == null) {
out.print("null");
return;
}
imports.add("java.awt.AlphaComposite");
out.print("AlphaComposite.getInstance(" + ac.getRule() + ", "
+ ac.getAlpha() + "f)");
}
private void write(Point2D p) {
if (p == null) {
out.print("null");
return;
}
imports.add("java.awt.geom.Point2D");
out.print("new Point2D.Double(" + p.getX() + ", " + p.getY() + ")");
}
private void write(Rectangle2D r) {
if (r == null) {
out.print("null");
return;
}
imports.add("java.awt.geom.Rectangle2D");
out.print("new Rectangle2D.Double(" + r.getX() + ", " + r.getY() + ", "
+ r.getWidth() + ", " + r.getHeight() + ")");
}
private void write(String s) {
if (s == null) {
out.print("(String)null");
return;
}
StringBuffer sb = new StringBuffer();
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
switch (c) {
case '\\':
sb.append("\\\\");
break;
case '"':
sb.append("\\\"");
break;
default:
sb.append(toUnicode(c));
break;
}
}
out.print("\"" + sb.toString() + "\"");
}
private void write(TagString s) {
if (s == null) {
out.print("null");
return;
}
imports.add("org.freehep.graphics2d.TagString");
out.print("new TagString(");
write(s.toString());
out.print(")");
}
private String vg() {
Integer index = (Integer) vg.get(this);
return "vg["
+ ((index != null) ? String.valueOf(index.intValue()) : "null")
+ "]";
}
private String toUnicode(char c) {
if ((c <= 0x1f) || (0x7f <= c)) {
String unicode = "0000" + Integer.toHexString(c);
return "\\u" + unicode.substring(unicode.length() - 4);
} else {
return String.valueOf(c);
}
}
}
src/main/java/org/freehep/graphicsio/java/JAVAGeneralPath.java 0000644 0001750 0001750 00000017556 10631754374 023537 0 ustar user01 user01 // Copyright 2000-2003 FreeHEP
package org.freehep.graphicsio.java;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.geom.AffineTransform;
import java.awt.geom.FlatteningPathIterator;
import java.awt.geom.PathIterator;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
/**
* @author Mark Donszelmann
* @version $Id: JAVAGeneralPath.java 12619 2007-06-07 18:07:57Z duns $
*/
public class JAVAGeneralPath implements Shape {
private int rule;
private PathElement[] path;
private float minX, minY = Float.MAX_VALUE;
private float maxX, maxY = Float.MIN_VALUE;
public JAVAGeneralPath(int rule, PathElement[] path) {
this.rule = rule;
this.path = path;
for (int i = 0; i < path.length; i++) {
minX = Math.min(minX, path[i].getMinX());
maxX = Math.max(maxX, path[i].getMaxX());
minY = Math.min(minY, path[i].getMinY());
maxY = Math.max(maxY, path[i].getMaxY());
}
}
public static abstract class PathElement {
public abstract float getMinX();
public abstract float getMaxX();
public abstract float getMinY();
public abstract float getMaxY();
public abstract int currentSegment(float[] coords);
public abstract int currentSegment(double[] coords);
}
public static abstract class Point extends PathElement {
private float x, y;
public Point(float x, float y) {
this.x = x;
this.y = y;
}
public float getMinX() {
return x;
}
public float getMaxX() {
return x;
}
public float getMinY() {
return y;
}
public float getMaxY() {
return y;
}
protected void fill(float[] coords) {
coords[0] = x;
coords[1] = y;
}
protected void fill(double[] coords) {
coords[0] = x;
coords[1] = y;
}
}
public static class MoveTo extends Point {
public MoveTo(float x, float y) {
super(x, y);
}
public int currentSegment(float[] coords) {
fill(coords);
return PathIterator.SEG_MOVETO;
}
public int currentSegment(double[] coords) {
fill(coords);
return PathIterator.SEG_MOVETO;
}
}
public static class LineTo extends Point {
public LineTo(float x, float y) {
super(x, y);
}
public int currentSegment(float[] coords) {
fill(coords);
return PathIterator.SEG_LINETO;
}
public int currentSegment(double[] coords) {
fill(coords);
return PathIterator.SEG_LINETO;
}
}
public static class QuadTo extends PathElement {
private float x1, y1, x2, y2;
public QuadTo(float x1, float y1, float x2, float y2) {
super();
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
}
public float getMinX() {
return Math.min(x1, x2);
}
public float getMaxX() {
return Math.max(x1, x2);
}
public float getMinY() {
return Math.min(y1, y2);
}
public float getMaxY() {
return Math.max(y1, y2);
}
public int currentSegment(float[] coords) {
coords[0] = x1;
coords[1] = y1;
coords[2] = x2;
coords[3] = y2;
return PathIterator.SEG_QUADTO;
}
public int currentSegment(double[] coords) {
coords[0] = x1;
coords[1] = y1;
coords[2] = x2;
coords[3] = y2;
return PathIterator.SEG_QUADTO;
}
}
public static class CurveTo extends PathElement {
private float x1, y1, x2, y2, x3, y3;
public CurveTo(float x1, float y1, float x2, float y2, float x3,
float y3) {
super();
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
this.x3 = x3;
this.y3 = y3;
}
public float getMinX() {
return Math.min(x1, Math.min(x2, x3));
}
public float getMaxX() {
return Math.max(x1, Math.max(x2, x3));
}
public float getMinY() {
return Math.min(y1, Math.min(y2, y3));
}
public float getMaxY() {
return Math.max(y1, Math.max(y2, y3));
}
public int currentSegment(float[] coords) {
coords[0] = x1;
coords[1] = y1;
coords[2] = x2;
coords[3] = y2;
coords[4] = x3;
coords[5] = y3;
return PathIterator.SEG_CUBICTO;
}
public int currentSegment(double[] coords) {
coords[0] = x1;
coords[1] = y1;
coords[2] = x2;
coords[3] = y2;
coords[4] = x3;
coords[5] = y3;
return PathIterator.SEG_CUBICTO;
}
}
public static class ClosePath extends PathElement {
public ClosePath() {
super();
}
public float getMinX() {
return Float.MAX_VALUE;
}
public float getMaxX() {
return Float.MIN_VALUE;
}
public float getMinY() {
return Float.MAX_VALUE;
}
public float getMaxY() {
return Float.MIN_VALUE;
}
public int currentSegment(float[] coords) {
return PathIterator.SEG_CLOSE;
}
public int currentSegment(double[] coords) {
return PathIterator.SEG_CLOSE;
}
}
public Rectangle getBounds() {
return getBounds2D().getBounds();
}
public Rectangle2D getBounds2D() {
return new Rectangle2D.Float(minX, minY, maxX - minX, maxY - minY);
}
// approximation
public boolean contains(double x, double y) {
return getBounds2D().contains(x, y);
}
public boolean contains(Point2D p) {
return contains(p.getX(), p.getY());
}
// approximation
public boolean intersects(double x, double y, double w, double h) {
return getBounds2D().intersects(x, y, w, h);
}
public boolean intersects(Rectangle2D r) {
return intersects(r.getX(), r.getY(), r.getWidth(), r.getHeight());
}
// approximation
public boolean contains(double x, double y, double w, double h) {
return getBounds2D().contains(x, y, w, h);
}
public boolean contains(Rectangle2D r) {
return contains(r.getX(), r.getY(), r.getWidth(), r.getHeight());
}
public PathIterator getPathIterator(final AffineTransform at) {
return new PathIterator() {
private int index = 0;
private AffineTransform transform = at;
public int getWindingRule() {
return rule;
}
public boolean isDone() {
return index >= path.length;
}
public void next() {
if (!isDone())
index++;
}
public int currentSegment(float[] coords) {
int type = path[index].currentSegment(coords);
if (transform != null) transform.transform(coords, 0, coords, 0, coords.length / 2);
return type;
}
public int currentSegment(double[] coords) {
int type = path[index].currentSegment(coords);
if (transform != null) transform.transform(coords, 0, coords, 0, coords.length / 2);
return type;
}
};
}
public PathIterator getPathIterator(AffineTransform at, double flatness) {
return new FlatteningPathIterator(getPathIterator(at), flatness);
}
}
src/main/java/org/freehep/graphicsio/java/JAVAArrayMap.java 0000644 0001750 0001750 00000010401 10551726462 023035 0 ustar user01 user01 // Copyright 2007, FreeHEP
package org.freehep.graphicsio.java;
import java.util.HashMap;
import java.awt.RenderingHints;
/**
* Hashmap that can be constructed from an Array
*
* @author Steffen Greiffenberg
* @version $Revision$
*/
public class JAVAArrayMap extends HashMap {
/**
* Stores the string representation for JDK 1.5 Rendering Hints
*/
public static HashMap HINTS = new HashMap();
static {
HINTS.put(RenderingHints.KEY_ANTIALIASING,"RenderingHints.KEY_ANTIALIASING");
HINTS.put(RenderingHints.VALUE_ANTIALIAS_ON,"RenderingHints.VALUE_ANTIALIAS_ON");
HINTS.put(RenderingHints.VALUE_ANTIALIAS_OFF,"RenderingHints.VALUE_ANTIALIAS_OFF");
HINTS.put(RenderingHints.VALUE_ANTIALIAS_DEFAULT,"RenderingHints.VALUE_ANTIALIAS_DEFAULT");
HINTS.put(RenderingHints.KEY_RENDERING,"RenderingHints.KEY_RENDERING");
HINTS.put(RenderingHints.VALUE_RENDER_SPEED,"RenderingHints.VALUE_RENDER_SPEED");
HINTS.put(RenderingHints.VALUE_RENDER_QUALITY,"RenderingHints.VALUE_RENDER_QUALITY");
HINTS.put(RenderingHints.VALUE_RENDER_DEFAULT,"RenderingHints.VALUE_RENDER_DEFAULT");
HINTS.put(RenderingHints.KEY_DITHERING,"RenderingHints.KEY_DITHERING");
HINTS.put(RenderingHints.VALUE_DITHER_DISABLE,"RenderingHints.VALUE_DITHER_DISABLE");
HINTS.put(RenderingHints.VALUE_DITHER_ENABLE,"RenderingHints.VALUE_DITHER_ENABLE");
HINTS.put(RenderingHints.VALUE_DITHER_DEFAULT,"RenderingHints.VALUE_DITHER_DEFAULT");
HINTS.put(RenderingHints.KEY_TEXT_ANTIALIASING,"RenderingHints.KEY_TEXT_ANTIALIASING");
HINTS.put(RenderingHints.VALUE_TEXT_ANTIALIAS_ON,"RenderingHints.VALUE_TEXT_ANTIALIAS_ON");
HINTS.put(RenderingHints.VALUE_TEXT_ANTIALIAS_OFF,"RenderingHints.VALUE_TEXT_ANTIALIAS_OFF");
HINTS.put(RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT,"RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT");
HINTS.put(RenderingHints.KEY_FRACTIONALMETRICS,"RenderingHints.KEY_FRACTIONALMETRICS");
HINTS.put(RenderingHints.VALUE_FRACTIONALMETRICS_OFF,"RenderingHints.VALUE_FRACTIONALMETRICS_OFF");
HINTS.put(RenderingHints.VALUE_FRACTIONALMETRICS_ON,"RenderingHints.VALUE_FRACTIONALMETRICS_ON");
HINTS.put(RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT,"RenderingHints.VALUE_FRACTIONALMETRICS_DEFAULT");
HINTS.put(RenderingHints.KEY_INTERPOLATION,"RenderingHints.KEY_INTERPOLATION");
HINTS.put(RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR,"RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR");
HINTS.put(RenderingHints.VALUE_INTERPOLATION_BILINEAR,"RenderingHints.VALUE_INTERPOLATION_BILINEAR");
HINTS.put(RenderingHints.VALUE_INTERPOLATION_BICUBIC,"RenderingHints.VALUE_INTERPOLATION_BICUBIC");
HINTS.put(RenderingHints.KEY_ALPHA_INTERPOLATION,"RenderingHints.KEY_ALPHA_INTERPOLATION");
HINTS.put(RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED,"RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED");
HINTS.put(RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY,"RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY");
HINTS.put(RenderingHints.VALUE_ALPHA_INTERPOLATION_DEFAULT,"RenderingHints.VALUE_ALPHA_INTERPOLATION_DEFAULT");
HINTS.put(RenderingHints.KEY_COLOR_RENDERING,"RenderingHints.KEY_COLOR_RENDERING");
HINTS.put(RenderingHints.VALUE_COLOR_RENDER_SPEED,"RenderingHints.VALUE_COLOR_RENDER_SPEED");
HINTS.put(RenderingHints.VALUE_COLOR_RENDER_QUALITY,"RenderingHints.VALUE_COLOR_RENDER_QUALITY");
HINTS.put(RenderingHints.VALUE_COLOR_RENDER_DEFAULT,"RenderingHints.VALUE_COLOR_RENDER_DEFAULT");
HINTS.put(RenderingHints.KEY_STROKE_CONTROL,"RenderingHints.KEY_STROKE_CONTROL");
HINTS.put(RenderingHints.VALUE_STROKE_DEFAULT,"RenderingHints.VALUE_STROKE_DEFAULT");
HINTS.put(RenderingHints.VALUE_STROKE_NORMALIZE,"RenderingHints.VALUE_STROKE_NORMALIZE");
HINTS.put(RenderingHints.VALUE_STROKE_PURE,"RenderingHints.VALUE_STROKE_PURE");
}
/**
* writes the array into this
*
* @param elements array with [key, value, key, value ...]
*/
public JAVAArrayMap(Object[] elements) {
super(elements.length / 2);
for (int i = 0; i < elements.length; i = i + 2) {
put(elements[i], elements[i + 1]);
}
}
}
src/main/java/org/freehep/graphicsio/java/JAVAExportFileType.java 0000644 0001750 0001750 00000004772 10633527176 024264 0 ustar user01 user01 // Copyright 2000-2007 FreeHEP
package org.freehep.graphicsio.java;
import java.awt.Component;
import java.awt.Dimension;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Properties;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.exportchooser.AbstractExportFileType;
import org.freehep.graphicsio.exportchooser.OptionPanel;
import org.freehep.graphicsio.exportchooser.OptionCheckBox;
import org.freehep.util.UserProperties;
import org.freehep.swing.layout.TableLayout;
import javax.swing.JPanel;
import javax.swing.JLabel;
/**
* // FIXME, check all options
*
* @author Mark Donszelmann
* @version $Id: JAVAExportFileType.java 12753 2007-06-12 22:32:31Z duns $
*/
public class JAVAExportFileType extends AbstractExportFileType {
public String getDescription() {
return "Java Source File (for Testing)";
}
public String[] getExtensions() {
return new String[] { "java" };
}
public String[] getMIMETypes() {
return new String[] { "application/java" };
}
public boolean hasOptionPanel() {
return true;
}
public VectorGraphics getGraphics(File file, Component target)
throws IOException {
return new JAVAGraphics2D(file, target);
}
public VectorGraphics getGraphics(File file, Dimension dimension)
throws IOException {
return new JAVAGraphics2D(file, dimension);
}
public JPanel createOptionPanel(Properties user) {
UserProperties options = new UserProperties(user, JAVAGraphics2D
.getDefaultProperties());
// Make the full panel.
OptionPanel optionsPanel = new OptionPanel();
// Image settings
OptionPanel imagePanel = new OptionPanel("Images");
optionsPanel.add("0 0 [5 5 5 5] wt", imagePanel);
OptionCheckBox embedOptionCheckBox = new OptionCheckBox(options,
JAVAGraphics2D.EMBED_IMAGES, "Embed imagePanel as byte[]");
imagePanel.add(TableLayout.FULL, embedOptionCheckBox);
OptionCheckBox pathOptionCheckBox = new OptionCheckBox(options,
JAVAGraphics2D.COMPLETE_IMAGE_PATHS,
"Write complete path to image");
imagePanel.add(TableLayout.FULL, pathOptionCheckBox);
embedOptionCheckBox.disables(pathOptionCheckBox);
optionsPanel.add(TableLayout.COLUMN_FILL, new JLabel());
return optionsPanel;
}
public VectorGraphics getGraphics(OutputStream os, Component target)
throws IOException {
return new JAVAGraphics2D(os, target);
}
public VectorGraphics getGraphics(OutputStream os, Dimension dimension)
throws IOException {
return new JAVAGraphics2D(os, dimension);
}
}
src/main/java/overview.html 0000644 0001750 0001750 00000000127 10535662416 015276 0 ustar user01 user01
This is the API specification of the FreeHEP VectorGraphics package.
src/main/resources/ 0000700 0001750 0001750 00000000000 11343126076 013614 5 ustar user01 user01 src/main/resources/META-INF/ 0000700 0001750 0001750 00000000000 11343126076 014754 5 ustar user01 user01 src/main/resources/META-INF/services/ 0000700 0001750 0001750 00000000000 11343126076 016577 5 ustar user01 user01 src/main/resources/META-INF/services/org.freehep.util.export.ExportFileType 0000644 0001750 0001750 00000000057 10470455440 026160 0 ustar user01 user01 org.freehep.graphicsio.java.JAVAExportFileType
src/site/ 0000700 0001750 0001750 00000000000 11343226333 011617 5 ustar user01 user01 src/site/apt/ 0000700 0001750 0001750 00000000000 11343126076 012406 5 ustar user01 user01 src/site/site.xml 0000644 0001750 0001750 00000001742 10535764056 013336 0 ustar user01 user01
FreeHEP GraphicsIO Java
http://java.freehep.org/mvn/freehep-graphicsio-java
FreeHEP
http://java.freehep.org/images/sm-freehep.gif
http://java.freehep.org/
src/test/ 0000700 0001750 0001750 00000000000 11343126060 011626 5 ustar user01 user01 src/test/java/ 0000700 0001750 0001750 00000000000 11343126060 012547 5 ustar user01 user01 src/test/java/org/ 0000700 0001750 0001750 00000000000 11343126060 013336 5 ustar user01 user01 src/test/java/org/freehep/ 0000700 0001750 0001750 00000000000 11343126060 014754 5 ustar user01 user01 src/test/java/org/freehep/graphicsio/ 0000700 0001750 0001750 00000000000 11343126060 017104 5 ustar user01 user01 src/test/java/org/freehep/graphicsio/java/ 0000700 0001750 0001750 00000000000 11343126060 020025 5 ustar user01 user01 src/test/java/org/freehep/graphicsio/java/test/ 0000700 0001750 0001750 00000000000 11343126060 021004 5 ustar user01 user01 src/test/java/org/freehep/graphicsio/java/test/JAVATestSuite.java 0000644 0001750 0001750 00000001426 10542004410 024251 0 ustar user01 user01 // Copyright 2005-2006, FreeHEP.
package org.freehep.graphicsio.java.test;
import java.util.Properties;
import org.freehep.graphicsio.java.JAVAGraphics2D;
import org.freehep.graphicsio.test.TestSuite;
/**
* @author Mark Donszelmann
* @version $Id: JAVATestSuite.java 10220 2006-12-20 00:45:12Z duns $
*/
public class JAVATestSuite extends TestSuite {
public static TestSuite suite() {
JAVATestSuite suite = new JAVATestSuite();
Properties properties = new Properties();
properties.setProperty(JAVAGraphics2D.PACKAGE_NAME,
"org.freehep.graphicsio.java.test");
// suite.addTests("JAVA", "JAVA", "org/freehep/graphicsio/java/test", "java", true, properties);
suite.addTests("JAVA", properties);
return suite;
}
}
src/test/resources/ 0000700 0001750 0001750 00000000000 11343126060 013640 5 ustar user01 user01 src/test/resources/org/ 0000700 0001750 0001750 00000000000 11343126060 014427 5 ustar user01 user01 src/test/resources/org/freehep/ 0000700 0001750 0001750 00000000000 11343126060 016045 5 ustar user01 user01 src/test/resources/org/freehep/graphicsio/ 0000700 0001750 0001750 00000000000 11343126060 020175 5 ustar user01 user01 src/test/resources/org/freehep/graphicsio/java/ 0000700 0001750 0001750 00000000000 11343126060 021116 5 ustar user01 user01 src/test/resources/org/freehep/graphicsio/java/test/ 0000700 0001750 0001750 00000000000 11343126074 022102 5 ustar user01 user01 src/test/resources/org/freehep/graphicsio/java/test/TestCustomStrokes.java 0000644 0001750 0001750 00000051556 10466645574 026500 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.java.JAVAGeneralPath;
import org.freehep.graphicsio.test.TestingPanel;
public class TestCustomStrokes extends TestingPanel {
public TestCustomStrokes(String[] args) throws Exception {
super(args);
setName("TestCustomStrokes");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[2] = (VectorGraphics)vg[1].create();
vg[2].setColor(new Color(0, 0, 0, 255));
vg[2].translate(10, 175);
vg[2].setStroke(new BasicStroke(
4.0f, 2,
0, 10.0f,
null, 0.0f
));
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(66.71875f, -52.65625f),
new JAVAGeneralPath.QuadTo(80.859375f, -49.359375f, 86.578125f, -44.671875f),
new JAVAGeneralPath.QuadTo(94.78125f, -38.015625f, 94.78125f, -27.390625f),
new JAVAGeneralPath.QuadTo(94.78125f, -16.1875f, 85.765625f, -8.859375f),
new JAVAGeneralPath.QuadTo(74.703125f, 0.0f, 53.609375f, 0.0f),
new JAVAGeneralPath.LineTo(3.15625f, 0.0f),
new JAVAGeneralPath.LineTo(3.15625f, -2.703125f),
new JAVAGeneralPath.QuadTo(10.03125f, -2.703125f, 12.484375f, -3.9921875f),
new JAVAGeneralPath.QuadTo(14.9375f, -5.28125f, 15.9296875f, -7.328125f),
new JAVAGeneralPath.QuadTo(16.921875f, -9.375f, 16.921875f, -17.4375f),
new JAVAGeneralPath.LineTo(16.921875f, -81.890625f),
new JAVAGeneralPath.QuadTo(16.921875f, -89.9375f, 15.9296875f, -92.02344f),
new JAVAGeneralPath.QuadTo(14.9375f, -94.109375f, 12.453125f, -95.359375f),
new JAVAGeneralPath.QuadTo(9.96875f, -96.609375f, 3.15625f, -96.609375f),
new JAVAGeneralPath.LineTo(3.15625f, -99.3125f),
new JAVAGeneralPath.LineTo(50.75f, -99.3125f),
new JAVAGeneralPath.QuadTo(67.828125f, -99.3125f, 74.92969f, -96.27344f),
new JAVAGeneralPath.QuadTo(82.03125f, -93.234375f, 86.13281f, -87.19531f),
new JAVAGeneralPath.QuadTo(90.234375f, -81.15625f, 90.234375f, -74.34375f),
new JAVAGeneralPath.QuadTo(90.234375f, -67.15625f, 85.03125f, -61.554688f),
new JAVAGeneralPath.QuadTo(79.828125f, -55.953125f, 66.71875f, -52.65625f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(40.0625f, -54.640625f),
new JAVAGeneralPath.QuadTo(50.46875f, -54.640625f, 55.414062f, -56.984375f),
new JAVAGeneralPath.QuadTo(60.359375f, -59.328125f, 62.992188f, -63.578125f),
new JAVAGeneralPath.QuadTo(65.625f, -67.828125f, 65.625f, -74.421875f),
new JAVAGeneralPath.QuadTo(65.625f, -81.0f, 63.023438f, -85.21094f),
new JAVAGeneralPath.QuadTo(60.421875f, -89.421875f, 55.585938f, -91.625f),
new JAVAGeneralPath.QuadTo(50.75f, -93.828125f, 40.0625f, -93.75f),
new JAVAGeneralPath.LineTo(40.0625f, -54.640625f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(40.0625f, -48.921875f),
new JAVAGeneralPath.LineTo(40.0625f, -17.0625f),
new JAVAGeneralPath.LineTo(39.984375f, -13.40625f),
new JAVAGeneralPath.QuadTo(39.984375f, -9.453125f, 42.0f, -7.4375f),
new JAVAGeneralPath.QuadTo(44.015625f, -5.421875f, 47.96875f, -5.421875f),
new JAVAGeneralPath.QuadTo(53.828125f, -5.421875f, 58.773438f, -8.0234375f),
new JAVAGeneralPath.QuadTo(63.71875f, -10.625f, 66.359375f, -15.5703125f),
new JAVAGeneralPath.QuadTo(69.0f, -20.515625f, 69.0f, -26.59375f),
new JAVAGeneralPath.QuadTo(69.0f, -33.546875f, 65.77344f, -39.078125f),
new JAVAGeneralPath.QuadTo(62.546875f, -44.609375f, 56.90625f, -46.804688f),
new JAVAGeneralPath.QuadTo(51.265625f, -49.0f, 40.0625f, -48.921875f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].translate(100, 0);
System.err.println("class org.freehep.graphicsio.java.JAVAGraphics2D: setStroke(Stroke) not implemented.");
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(66.71875f, -52.65625f),
new JAVAGeneralPath.QuadTo(80.859375f, -49.359375f, 86.578125f, -44.671875f),
new JAVAGeneralPath.QuadTo(94.78125f, -38.015625f, 94.78125f, -27.390625f),
new JAVAGeneralPath.QuadTo(94.78125f, -16.1875f, 85.765625f, -8.859375f),
new JAVAGeneralPath.QuadTo(74.703125f, 0.0f, 53.609375f, 0.0f),
new JAVAGeneralPath.LineTo(3.15625f, 0.0f),
new JAVAGeneralPath.LineTo(3.15625f, -2.703125f),
new JAVAGeneralPath.QuadTo(10.03125f, -2.703125f, 12.484375f, -3.9921875f),
new JAVAGeneralPath.QuadTo(14.9375f, -5.28125f, 15.9296875f, -7.328125f),
new JAVAGeneralPath.QuadTo(16.921875f, -9.375f, 16.921875f, -17.4375f),
new JAVAGeneralPath.LineTo(16.921875f, -81.890625f),
new JAVAGeneralPath.QuadTo(16.921875f, -89.9375f, 15.9296875f, -92.02344f),
new JAVAGeneralPath.QuadTo(14.9375f, -94.109375f, 12.453125f, -95.359375f),
new JAVAGeneralPath.QuadTo(9.96875f, -96.609375f, 3.15625f, -96.609375f),
new JAVAGeneralPath.LineTo(3.15625f, -99.3125f),
new JAVAGeneralPath.LineTo(50.75f, -99.3125f),
new JAVAGeneralPath.QuadTo(67.828125f, -99.3125f, 74.92969f, -96.27344f),
new JAVAGeneralPath.QuadTo(82.03125f, -93.234375f, 86.13281f, -87.19531f),
new JAVAGeneralPath.QuadTo(90.234375f, -81.15625f, 90.234375f, -74.34375f),
new JAVAGeneralPath.QuadTo(90.234375f, -67.15625f, 85.03125f, -61.554688f),
new JAVAGeneralPath.QuadTo(79.828125f, -55.953125f, 66.71875f, -52.65625f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(40.0625f, -54.640625f),
new JAVAGeneralPath.QuadTo(50.46875f, -54.640625f, 55.414062f, -56.984375f),
new JAVAGeneralPath.QuadTo(60.359375f, -59.328125f, 62.992188f, -63.578125f),
new JAVAGeneralPath.QuadTo(65.625f, -67.828125f, 65.625f, -74.421875f),
new JAVAGeneralPath.QuadTo(65.625f, -81.0f, 63.023438f, -85.21094f),
new JAVAGeneralPath.QuadTo(60.421875f, -89.421875f, 55.585938f, -91.625f),
new JAVAGeneralPath.QuadTo(50.75f, -93.828125f, 40.0625f, -93.75f),
new JAVAGeneralPath.LineTo(40.0625f, -54.640625f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(40.0625f, -48.921875f),
new JAVAGeneralPath.LineTo(40.0625f, -17.0625f),
new JAVAGeneralPath.LineTo(39.984375f, -13.40625f),
new JAVAGeneralPath.QuadTo(39.984375f, -9.453125f, 42.0f, -7.4375f),
new JAVAGeneralPath.QuadTo(44.015625f, -5.421875f, 47.96875f, -5.421875f),
new JAVAGeneralPath.QuadTo(53.828125f, -5.421875f, 58.773438f, -8.0234375f),
new JAVAGeneralPath.QuadTo(63.71875f, -10.625f, 66.359375f, -15.5703125f),
new JAVAGeneralPath.QuadTo(69.0f, -20.515625f, 69.0f, -26.59375f),
new JAVAGeneralPath.QuadTo(69.0f, -33.546875f, 65.77344f, -39.078125f),
new JAVAGeneralPath.QuadTo(62.546875f, -44.609375f, 56.90625f, -46.804688f),
new JAVAGeneralPath.QuadTo(51.265625f, -49.0f, 40.0625f, -48.921875f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].translate(100, 0);
System.err.println("class org.freehep.graphicsio.java.JAVAGraphics2D: setStroke(Stroke) not implemented.");
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(66.71875f, -52.65625f),
new JAVAGeneralPath.QuadTo(80.859375f, -49.359375f, 86.578125f, -44.671875f),
new JAVAGeneralPath.QuadTo(94.78125f, -38.015625f, 94.78125f, -27.390625f),
new JAVAGeneralPath.QuadTo(94.78125f, -16.1875f, 85.765625f, -8.859375f),
new JAVAGeneralPath.QuadTo(74.703125f, 0.0f, 53.609375f, 0.0f),
new JAVAGeneralPath.LineTo(3.15625f, 0.0f),
new JAVAGeneralPath.LineTo(3.15625f, -2.703125f),
new JAVAGeneralPath.QuadTo(10.03125f, -2.703125f, 12.484375f, -3.9921875f),
new JAVAGeneralPath.QuadTo(14.9375f, -5.28125f, 15.9296875f, -7.328125f),
new JAVAGeneralPath.QuadTo(16.921875f, -9.375f, 16.921875f, -17.4375f),
new JAVAGeneralPath.LineTo(16.921875f, -81.890625f),
new JAVAGeneralPath.QuadTo(16.921875f, -89.9375f, 15.9296875f, -92.02344f),
new JAVAGeneralPath.QuadTo(14.9375f, -94.109375f, 12.453125f, -95.359375f),
new JAVAGeneralPath.QuadTo(9.96875f, -96.609375f, 3.15625f, -96.609375f),
new JAVAGeneralPath.LineTo(3.15625f, -99.3125f),
new JAVAGeneralPath.LineTo(50.75f, -99.3125f),
new JAVAGeneralPath.QuadTo(67.828125f, -99.3125f, 74.92969f, -96.27344f),
new JAVAGeneralPath.QuadTo(82.03125f, -93.234375f, 86.13281f, -87.19531f),
new JAVAGeneralPath.QuadTo(90.234375f, -81.15625f, 90.234375f, -74.34375f),
new JAVAGeneralPath.QuadTo(90.234375f, -67.15625f, 85.03125f, -61.554688f),
new JAVAGeneralPath.QuadTo(79.828125f, -55.953125f, 66.71875f, -52.65625f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(40.0625f, -54.640625f),
new JAVAGeneralPath.QuadTo(50.46875f, -54.640625f, 55.414062f, -56.984375f),
new JAVAGeneralPath.QuadTo(60.359375f, -59.328125f, 62.992188f, -63.578125f),
new JAVAGeneralPath.QuadTo(65.625f, -67.828125f, 65.625f, -74.421875f),
new JAVAGeneralPath.QuadTo(65.625f, -81.0f, 63.023438f, -85.21094f),
new JAVAGeneralPath.QuadTo(60.421875f, -89.421875f, 55.585938f, -91.625f),
new JAVAGeneralPath.QuadTo(50.75f, -93.828125f, 40.0625f, -93.75f),
new JAVAGeneralPath.LineTo(40.0625f, -54.640625f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(40.0625f, -48.921875f),
new JAVAGeneralPath.LineTo(40.0625f, -17.0625f),
new JAVAGeneralPath.LineTo(39.984375f, -13.40625f),
new JAVAGeneralPath.QuadTo(39.984375f, -9.453125f, 42.0f, -7.4375f),
new JAVAGeneralPath.QuadTo(44.015625f, -5.421875f, 47.96875f, -5.421875f),
new JAVAGeneralPath.QuadTo(53.828125f, -5.421875f, 58.773438f, -8.0234375f),
new JAVAGeneralPath.QuadTo(63.71875f, -10.625f, 66.359375f, -15.5703125f),
new JAVAGeneralPath.QuadTo(69.0f, -20.515625f, 69.0f, -26.59375f),
new JAVAGeneralPath.QuadTo(69.0f, -33.546875f, 65.77344f, -39.078125f),
new JAVAGeneralPath.QuadTo(62.546875f, -44.609375f, 56.90625f, -46.804688f),
new JAVAGeneralPath.QuadTo(51.265625f, -49.0f, 40.0625f, -48.921875f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].translate(100, 0);
System.err.println("class org.freehep.graphicsio.java.JAVAGraphics2D: setStroke(Stroke) not implemented.");
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(66.71875f, -52.65625f),
new JAVAGeneralPath.QuadTo(80.859375f, -49.359375f, 86.578125f, -44.671875f),
new JAVAGeneralPath.QuadTo(94.78125f, -38.015625f, 94.78125f, -27.390625f),
new JAVAGeneralPath.QuadTo(94.78125f, -16.1875f, 85.765625f, -8.859375f),
new JAVAGeneralPath.QuadTo(74.703125f, 0.0f, 53.609375f, 0.0f),
new JAVAGeneralPath.LineTo(3.15625f, 0.0f),
new JAVAGeneralPath.LineTo(3.15625f, -2.703125f),
new JAVAGeneralPath.QuadTo(10.03125f, -2.703125f, 12.484375f, -3.9921875f),
new JAVAGeneralPath.QuadTo(14.9375f, -5.28125f, 15.9296875f, -7.328125f),
new JAVAGeneralPath.QuadTo(16.921875f, -9.375f, 16.921875f, -17.4375f),
new JAVAGeneralPath.LineTo(16.921875f, -81.890625f),
new JAVAGeneralPath.QuadTo(16.921875f, -89.9375f, 15.9296875f, -92.02344f),
new JAVAGeneralPath.QuadTo(14.9375f, -94.109375f, 12.453125f, -95.359375f),
new JAVAGeneralPath.QuadTo(9.96875f, -96.609375f, 3.15625f, -96.609375f),
new JAVAGeneralPath.LineTo(3.15625f, -99.3125f),
new JAVAGeneralPath.LineTo(50.75f, -99.3125f),
new JAVAGeneralPath.QuadTo(67.828125f, -99.3125f, 74.92969f, -96.27344f),
new JAVAGeneralPath.QuadTo(82.03125f, -93.234375f, 86.13281f, -87.19531f),
new JAVAGeneralPath.QuadTo(90.234375f, -81.15625f, 90.234375f, -74.34375f),
new JAVAGeneralPath.QuadTo(90.234375f, -67.15625f, 85.03125f, -61.554688f),
new JAVAGeneralPath.QuadTo(79.828125f, -55.953125f, 66.71875f, -52.65625f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(40.0625f, -54.640625f),
new JAVAGeneralPath.QuadTo(50.46875f, -54.640625f, 55.414062f, -56.984375f),
new JAVAGeneralPath.QuadTo(60.359375f, -59.328125f, 62.992188f, -63.578125f),
new JAVAGeneralPath.QuadTo(65.625f, -67.828125f, 65.625f, -74.421875f),
new JAVAGeneralPath.QuadTo(65.625f, -81.0f, 63.023438f, -85.21094f),
new JAVAGeneralPath.QuadTo(60.421875f, -89.421875f, 55.585938f, -91.625f),
new JAVAGeneralPath.QuadTo(50.75f, -93.828125f, 40.0625f, -93.75f),
new JAVAGeneralPath.LineTo(40.0625f, -54.640625f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(40.0625f, -48.921875f),
new JAVAGeneralPath.LineTo(40.0625f, -17.0625f),
new JAVAGeneralPath.LineTo(39.984375f, -13.40625f),
new JAVAGeneralPath.QuadTo(39.984375f, -9.453125f, 42.0f, -7.4375f),
new JAVAGeneralPath.QuadTo(44.015625f, -5.421875f, 47.96875f, -5.421875f),
new JAVAGeneralPath.QuadTo(53.828125f, -5.421875f, 58.773438f, -8.0234375f),
new JAVAGeneralPath.QuadTo(63.71875f, -10.625f, 66.359375f, -15.5703125f),
new JAVAGeneralPath.QuadTo(69.0f, -20.515625f, 69.0f, -26.59375f),
new JAVAGeneralPath.QuadTo(69.0f, -33.546875f, 65.77344f, -39.078125f),
new JAVAGeneralPath.QuadTo(62.546875f, -44.609375f, 56.90625f, -46.804688f),
new JAVAGeneralPath.QuadTo(51.265625f, -49.0f, 40.0625f, -48.921875f),
new JAVAGeneralPath.ClosePath()
}));
Paint0s1.paint(vg);
} // paint
} // class Paint0s0
private static class Paint0s1 {
public static void paint(VectorGraphics[] vg) {
vg[2].translate(100, 0);
System.err.println("class org.freehep.graphicsio.java.JAVAGraphics2D: setStroke(Stroke) not implemented.");
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(66.71875f, -52.65625f),
new JAVAGeneralPath.QuadTo(80.859375f, -49.359375f, 86.578125f, -44.671875f),
new JAVAGeneralPath.QuadTo(94.78125f, -38.015625f, 94.78125f, -27.390625f),
new JAVAGeneralPath.QuadTo(94.78125f, -16.1875f, 85.765625f, -8.859375f),
new JAVAGeneralPath.QuadTo(74.703125f, 0.0f, 53.609375f, 0.0f),
new JAVAGeneralPath.LineTo(3.15625f, 0.0f),
new JAVAGeneralPath.LineTo(3.15625f, -2.703125f),
new JAVAGeneralPath.QuadTo(10.03125f, -2.703125f, 12.484375f, -3.9921875f),
new JAVAGeneralPath.QuadTo(14.9375f, -5.28125f, 15.9296875f, -7.328125f),
new JAVAGeneralPath.QuadTo(16.921875f, -9.375f, 16.921875f, -17.4375f),
new JAVAGeneralPath.LineTo(16.921875f, -81.890625f),
new JAVAGeneralPath.QuadTo(16.921875f, -89.9375f, 15.9296875f, -92.02344f),
new JAVAGeneralPath.QuadTo(14.9375f, -94.109375f, 12.453125f, -95.359375f),
new JAVAGeneralPath.QuadTo(9.96875f, -96.609375f, 3.15625f, -96.609375f),
new JAVAGeneralPath.LineTo(3.15625f, -99.3125f),
new JAVAGeneralPath.LineTo(50.75f, -99.3125f),
new JAVAGeneralPath.QuadTo(67.828125f, -99.3125f, 74.92969f, -96.27344f),
new JAVAGeneralPath.QuadTo(82.03125f, -93.234375f, 86.13281f, -87.19531f),
new JAVAGeneralPath.QuadTo(90.234375f, -81.15625f, 90.234375f, -74.34375f),
new JAVAGeneralPath.QuadTo(90.234375f, -67.15625f, 85.03125f, -61.554688f),
new JAVAGeneralPath.QuadTo(79.828125f, -55.953125f, 66.71875f, -52.65625f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(40.0625f, -54.640625f),
new JAVAGeneralPath.QuadTo(50.46875f, -54.640625f, 55.414062f, -56.984375f),
new JAVAGeneralPath.QuadTo(60.359375f, -59.328125f, 62.992188f, -63.578125f),
new JAVAGeneralPath.QuadTo(65.625f, -67.828125f, 65.625f, -74.421875f),
new JAVAGeneralPath.QuadTo(65.625f, -81.0f, 63.023438f, -85.21094f),
new JAVAGeneralPath.QuadTo(60.421875f, -89.421875f, 55.585938f, -91.625f),
new JAVAGeneralPath.QuadTo(50.75f, -93.828125f, 40.0625f, -93.75f),
new JAVAGeneralPath.LineTo(40.0625f, -54.640625f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(40.0625f, -48.921875f),
new JAVAGeneralPath.LineTo(40.0625f, -17.0625f),
new JAVAGeneralPath.LineTo(39.984375f, -13.40625f),
new JAVAGeneralPath.QuadTo(39.984375f, -9.453125f, 42.0f, -7.4375f),
new JAVAGeneralPath.QuadTo(44.015625f, -5.421875f, 47.96875f, -5.421875f),
new JAVAGeneralPath.QuadTo(53.828125f, -5.421875f, 58.773438f, -8.0234375f),
new JAVAGeneralPath.QuadTo(63.71875f, -10.625f, 66.359375f, -15.5703125f),
new JAVAGeneralPath.QuadTo(69.0f, -20.515625f, 69.0f, -26.59375f),
new JAVAGeneralPath.QuadTo(69.0f, -33.546875f, 65.77344f, -39.078125f),
new JAVAGeneralPath.QuadTo(62.546875f, -44.609375f, 56.90625f, -46.804688f),
new JAVAGeneralPath.QuadTo(51.265625f, -49.0f, 40.0625f, -48.921875f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].translate(100, 0);
vg[2].translate(-500, 0);
vg[2].translate(10, 100);
vg[2].setStroke(new BasicStroke(
4.0f, 2,
0, 10.0f,
null, 0.0f
));
vg[2].drawRect(10, 10, 80, 50);
vg[2].translate(100, 0);
System.err.println("class org.freehep.graphicsio.java.JAVAGraphics2D: setStroke(Stroke) not implemented.");
vg[2].drawRect(10, 10, 80, 50);
vg[2].translate(100, 0);
System.err.println("class org.freehep.graphicsio.java.JAVAGraphics2D: setStroke(Stroke) not implemented.");
vg[2].drawRect(10, 10, 80, 50);
vg[2].translate(100, 0);
System.err.println("class org.freehep.graphicsio.java.JAVAGraphics2D: setStroke(Stroke) not implemented.");
vg[2].drawRect(10, 10, 80, 50);
vg[2].translate(100, 0);
System.err.println("class org.freehep.graphicsio.java.JAVAGraphics2D: setStroke(Stroke) not implemented.");
vg[2].drawRect(10, 10, 80, 50);
vg[2].translate(100, 0);
vg[1].dispose();
} // paint
} // class Paint0s1
private VectorGraphics vg[] = new VectorGraphics[3];
public static void main(String[] args) throws Exception {
new TestCustomStrokes(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestText2D.java 0000644 0001750 0001750 00000014573 10407470034 024741 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.TagString;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestText2D extends TestingPanel {
public TestText2D(String[] args) throws Exception {
super(args);
setName("TestText2D");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setColor(new Color(0, 255, 0, 255));
vg[1].drawLine(0, 30, 600, 30);
vg[1].drawLine(0, 90, 600, 90);
vg[1].drawLine(0, 150, 600, 150);
vg[1].drawLine(0, 210, 600, 210);
vg[1].drawLine(0, 270, 600, 270);
vg[1].drawLine(0, 330, 600, 330);
vg[1].drawLine(0, 390, 600, 390);
vg[1].drawLine(0, 450, 600, 450);
vg[1].drawLine(100, 0, 100, 600);
vg[1].drawLine(300, 0, 300, 600);
vg[1].drawLine(500, 0, 500, 600);
vg[1].setColor(new Color(255, 0, 0, 255));
vg[1].setFont(new Font("SansSerif", 0, 10));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 100.0, 30.0, 3, 0);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 300.0, 30.0, 2, 0);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 500.0, 30.0, 1, 0);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 100.0, 90.0, 3, 1);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 300.0, 90.0, 2, 1);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 500.0, 90.0, 1, 1);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 100.0, 150.0, 3, 2);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 300.0, 150.0, 2, 2);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 500.0, 150.0, 1, 2);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 100.0, 210.0, 3, 3);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 300.0, 210.0, 2, 3);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 500.0, 210.0, 1, 3);
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 100.0, 270.0, 3, 0, true, new Color(0, 255, 255, 255), 2.0, true, new Color(0, 0, 0, 255));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 300.0, 270.0, 2, 0, true, new Color(0, 255, 255, 255), 2.0, true, new Color(0, 0, 0, 255));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 500.0, 270.0, 1, 0, true, new Color(0, 255, 255, 255), 2.0, true, new Color(0, 0, 0, 255));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 100.0, 330.0, 3, 1, false, new Color(0, 255, 255, 255), 2.0, true, new Color(0, 0, 0, 255));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 300.0, 330.0, 2, 1, false, new Color(0, 255, 255, 255), 2.0, true, new Color(0, 0, 0, 255));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 500.0, 330.0, 1, 1, false, new Color(0, 255, 255, 255), 2.0, true, new Color(0, 0, 0, 255));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 100.0, 390.0, 3, 2, true, new Color(0, 255, 255, 255), 2.0, false, new Color(0, 0, 0, 255));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 300.0, 390.0, 2, 2, true, new Color(0, 255, 255, 255), 2.0, false, new Color(0, 0, 0, 255));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 500.0, 390.0, 1, 2, true, new Color(0, 255, 255, 255), 2.0, false, new Color(0, 0, 0, 255));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 100.0, 450.0, 3, 3, false, new Color(0, 255, 255, 255), 2.0, false, new Color(0, 0, 0, 255));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 300.0, 450.0, 2, 3, false, new Color(0, 255, 255, 255), 2.0, false, new Color(0, 0, 0, 255));
vg[1].drawString(new TagString("<Vector\\Graphics% & Card)Adapter)>"), 500.0, 450.0, 1, 3, false, new Color(0, 255, 255, 255), 2.0, false, new Color(0, 0, 0, 255));
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[2];
public static void main(String[] args) throws Exception {
new TestText2D(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestSymbols2D.java 0000644 0001750 0001750 00000006037 10407470034 025441 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestSymbols2D extends TestingPanel {
public TestSymbols2D(String[] args) throws Exception {
super(args);
setName("TestSymbols2D");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 0, 0, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setLineWidth(1);
vg[1].drawSymbol(60, 37, 50, 0);
vg[1].drawSymbol(180, 37, 50, 1);
vg[1].drawSymbol(300, 37, 50, 2);
vg[1].drawSymbol(420, 37, 50, 3);
vg[1].drawSymbol(540, 37, 50, 4);
vg[1].setLineWidth(5.0);
vg[1].drawSymbol(60, 112, 50, 0);
vg[1].drawSymbol(180, 112, 50, 1);
vg[1].drawSymbol(300, 112, 50, 2);
vg[1].drawSymbol(420, 112, 50, 3);
vg[1].drawSymbol(540, 112, 50, 4);
vg[1].setLineWidth(1);
vg[1].drawSymbol(60, 187, 50, 5);
vg[1].drawSymbol(180, 187, 50, 6);
vg[1].drawSymbol(300, 187, 50, 7);
vg[1].drawSymbol(420, 187, 50, 8);
vg[1].drawSymbol(540, 187, 50, 9);
vg[1].setLineWidth(5.0);
vg[1].drawSymbol(60, 262, 50, 5);
vg[1].drawSymbol(180, 262, 50, 6);
vg[1].drawSymbol(300, 262, 50, 7);
vg[1].drawSymbol(420, 262, 50, 8);
vg[1].drawSymbol(540, 262, 50, 9);
vg[1].setLineWidth(1);
vg[1].fillSymbol(60, 337, 50, 5);
vg[1].fillSymbol(180, 337, 50, 6);
vg[1].fillSymbol(300, 337, 50, 7);
vg[1].fillSymbol(420, 337, 50, 8);
vg[1].fillSymbol(540, 337, 50, 9);
vg[1].setLineWidth(5.0);
vg[1].fillSymbol(60, 412, 50, 5);
vg[1].fillSymbol(180, 412, 50, 6);
vg[1].fillSymbol(300, 412, 50, 7);
vg[1].fillSymbol(420, 412, 50, 8);
vg[1].fillSymbol(540, 412, 50, 9);
vg[1].setLineWidth(1);
vg[1].setLineWidth(5.0);
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[2];
public static void main(String[] args) throws Exception {
new TestSymbols2D(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestTransforms.java 0000644 0001750 0001750 00000020612 10407470034 025754 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.geom.AffineTransform;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.java.JAVAGeneralPath;
import org.freehep.graphicsio.test.TestingPanel;
public class TestTransforms extends TestingPanel {
public TestTransforms(String[] args) throws Exception {
super(args);
setName("TestTransforms");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[2] = (VectorGraphics)vg[1].create();
vg[2].setStroke(new BasicStroke(
5.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[2].translate(100, 100);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].dispose();
vg[3] = (VectorGraphics)vg[1].create();
vg[3].setStroke(new BasicStroke(
5.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[3].translate(300, 100);
vg[3].rotate(0.7853981633974483);
vg[3].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[3].dispose();
vg[4] = (VectorGraphics)vg[1].create();
vg[4].setStroke(new BasicStroke(
5.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[4].translate(500, 100);
vg[4].scale(2.0, 0.5);
vg[4].fillAndDraw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}), new Color(255, 0, 0, 255));
vg[4].dispose();
vg[5] = (VectorGraphics)vg[1].create();
vg[5].setStroke(new BasicStroke(
5.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[5].translate(100, 300);
vg[5].shear(1.0, 0.0);
vg[5].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[5].dispose();
vg[6] = (VectorGraphics)vg[1].create();
vg[6].setStroke(new BasicStroke(
5.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[6].translate(300, 300);
vg[6].shear(0.0, 1.0);
vg[6].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[6].dispose();
vg[7] = (VectorGraphics)vg[1].create();
vg[7].setStroke(new BasicStroke(
5.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[7].translate(500, 300);
vg[7].rotate(-0.7853981633974483, 50.0, 50.0);
vg[7].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[7].dispose();
vg[8] = (VectorGraphics)vg[1].create();
vg[8].setStroke(new BasicStroke(
5.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[8].translate(100, 500);
vg[8].transform(new AffineTransform(2.0, 0.0, 1.0, 0.5, 50.0, 0.0));
vg[8].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[8].dispose();
vg[9] = (VectorGraphics)vg[1].create();
vg[9].setStroke(new BasicStroke(
5.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[9].translate(300, 500);
vg[9].transform(new AffineTransform(0.5, 1.0, 0.0, 2.0, 50.0, -50.0));
vg[9].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[9].dispose();
vg[1].setTransform(new AffineTransform(1.0, 0.0, 0.0, 1.0, 400.0, 400.0));
vg[10] = (VectorGraphics)vg[1].create();
vg[10].setStroke(new BasicStroke(
5.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[10].transform(new AffineTransform(0.5, 1.0, 0.0, 1.0, 0.0, 0.0));
vg[10].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[10].dispose();
vg[1].setTransform(new AffineTransform(1.0, 0.0, 0.0, 1.0, 0.0, 0.0));
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[11];
public static void main(String[] args) throws Exception {
new TestTransforms(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestLabels.java 0000644 0001750 0001750 00000023065 10407470034 025025 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestLabels extends TestingPanel {
public TestLabels(String[] args) throws Exception {
super(args);
setName("TestLabels");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[2] = (VectorGraphics)vg[1].create();
vg[2].setColor(new Color(238, 238, 238, 255));
vg[2].fillRect(0, 0, 600, 600);
vg[2].dispose();
vg[3] = (VectorGraphics)vg[1].create();
vg[4] = (VectorGraphics)vg[3].create(496, 8, 73, 20);
vg[4].setColor(new Color(51, 51, 51, 255));
vg[4].setFont(new Font("Dialog", 1, 12));
vg[4].setColor(new Color(51, 51, 51, 255));
vg[4].setFont(new Font("Dialog", 1, 12));
vg[5] = (VectorGraphics)vg[4].create();
vg[6] = (VectorGraphics)vg[5].create();
vg[6].translate(0, 0);
vg[6].drawImage(new BufferedImage(64, 20, BufferedImage.TYPE_INT_ARGB), 0, 0, 64, 20, 0, 0, 64, 20, null);
vg[6].drawImage(new BufferedImage(64, 20, BufferedImage.TYPE_INT_ARGB), 64, 0, 73, 20, 0, 0, 9, 20, null);
vg[6].translate(0, 0);
vg[6].setFont(new Font("Dialog", 1, 12));
vg[6].setColor(new Color(51, 51, 51, 255));
vg[6].drawString("TestButton3", 2, 15);
vg[6].dispose();
vg[5].translate(0, 0);
vg[5].setColor(new Color(166, 166, 166, 255));
vg[5].drawLine(0, 0, 0, 19);
vg[5].drawLine(1, 0, 72, 0);
vg[5].setColor(new Color(116, 116, 116, 255));
vg[5].drawLine(1, 1, 1, 18);
vg[5].drawLine(2, 1, 71, 1);
vg[5].setColor(new Color(255, 255, 255, 255));
vg[5].drawLine(1, 19, 72, 19);
vg[5].drawLine(72, 1, 72, 18);
vg[5].setColor(new Color(255, 255, 255, 255));
vg[5].drawLine(2, 18, 71, 18);
vg[5].drawLine(71, 2, 71, 17);
vg[5].translate(0, 0);
vg[5].setColor(new Color(51, 51, 51, 255));
vg[5].dispose();
vg[4].dispose();
vg[7] = (VectorGraphics)vg[3].create(418, 8, 73, 20);
vg[7].setColor(new Color(51, 51, 51, 255));
vg[7].setFont(new Font("Dialog", 1, 12));
vg[7].setColor(new Color(51, 51, 51, 255));
vg[7].setFont(new Font("Dialog", 1, 12));
vg[8] = (VectorGraphics)vg[7].create();
vg[9] = (VectorGraphics)vg[8].create();
vg[9].translate(0, 0);
vg[9].drawImage(new BufferedImage(64, 20, BufferedImage.TYPE_INT_ARGB), 0, 0, 64, 20, 0, 0, 64, 20, null);
vg[9].drawImage(new BufferedImage(64, 20, BufferedImage.TYPE_INT_ARGB), 64, 0, 73, 20, 0, 0, 9, 20, null);
vg[9].translate(0, 0);
vg[9].setFont(new Font("Dialog", 1, 12));
vg[9].setColor(new Color(51, 51, 51, 255));
vg[9].drawString("TestButton2", 2, 15);
vg[9].dispose();
vg[8].translate(0, 0);
vg[8].setColor(new Color(166, 166, 166, 255));
vg[8].drawRect(0, 0, 71, 18);
vg[8].setColor(new Color(255, 255, 255, 255));
vg[8].drawLine(1, 17, 1, 1);
vg[8].drawLine(1, 1, 70, 1);
vg[8].drawLine(0, 19, 72, 19);
vg[8].drawLine(72, 19, 72, 0);
vg[8].translate(0, 0);
vg[8].dispose();
vg[7].dispose();
vg[10] = (VectorGraphics)vg[3].create(310, 5, 103, 26);
vg[10].setColor(new Color(51, 51, 51, 255));
vg[10].setFont(new Font("Dialog", 1, 12));
vg[10].setColor(new Color(51, 51, 51, 255));
vg[10].setFont(new Font("Dialog", 1, 12));
vg[11] = (VectorGraphics)vg[10].create();
vg[12] = (VectorGraphics)vg[11].create();
vg[12].translate(0, 0);
vg[12].drawImage(new BufferedImage(64, 26, BufferedImage.TYPE_INT_ARGB), 0, 0, 64, 26, 0, 0, 64, 26, null);
vg[12].drawImage(new BufferedImage(64, 26, BufferedImage.TYPE_INT_ARGB), 64, 0, 103, 26, 0, 0, 39, 26, null);
vg[12].translate(0, 0);
vg[12].setFont(new Font("Dialog", 1, 12));
vg[12].setColor(new Color(51, 51, 51, 255));
vg[12].drawString("TestButton1", 17, 18);
vg[12].dispose();
vg[11].translate(0, 0);
vg[11].setColor(new Color(122, 138, 153, 255));
vg[11].drawRect(0, 0, 102, 25);
vg[11].dispose();
vg[10].dispose();
vg[13] = (VectorGraphics)vg[3].create(242, 10, 63, 16);
vg[13].setColor(new Color(51, 51, 51, 255));
vg[13].setFont(new Font("Dialog", 1, 12));
vg[13].setColor(new Color(51, 51, 51, 255));
vg[13].setFont(new Font("Dialog", 1, 12));
vg[14] = (VectorGraphics)vg[13].create();
vg[15] = (VectorGraphics)vg[14].create();
vg[16] = (VectorGraphics)vg[15].create(0, 0, 63, 16);
vg[16].setColor(new Color(51, 51, 51, 255));
vg[16].setFont(new Font("Dialog", 1, 12));
vg[16].setColor(new Color(51, 51, 51, 255));
vg[16].setFont(new Font("Dialog", 1, 12));
vg[17] = (VectorGraphics)vg[16].create();
vg[18] = (VectorGraphics)vg[17].create();
vg[18].setColor(new Color(51, 51, 51, 255));
vg[18].drawString("TestLabel4", 0, 13);
vg[18].dispose();
vg[17].dispose();
vg[16].dispose();
vg[15].dispose();
vg[14].dispose();
vg[13].dispose();
vg[19] = (VectorGraphics)vg[3].create(170, 8, 67, 20);
vg[19].setColor(new Color(51, 51, 51, 255));
vg[19].setFont(new Font("Dialog", 1, 12));
vg[19].setColor(new Color(51, 51, 51, 255));
vg[19].setFont(new Font("Dialog", 1, 12));
vg[20] = (VectorGraphics)vg[19].create();
vg[21] = (VectorGraphics)vg[20].create();
vg[21].setColor(new Color(51, 51, 51, 255));
vg[21].drawString("TestLabel3", 2, 15);
vg[21].dispose();
vg[20].translate(0, 0);
vg[20].setColor(new Color(166, 166, 166, 255));
vg[20].drawLine(0, 0, 0, 19);
vg[20].drawLine(1, 0, 66, 0);
vg[20].setColor(new Color(116, 116, 116, 255));
vg[20].drawLine(1, 1, 1, 18);
vg[20].drawLine(2, 1, 65, 1);
vg[20].setColor(new Color(255, 255, 255, 255));
vg[20].drawLine(1, 19, 66, 19);
vg[20].drawLine(66, 1, 66, 18);
vg[20].setColor(new Color(255, 255, 255, 255));
vg[20].drawLine(2, 18, 65, 18);
vg[20].drawLine(65, 2, 65, 17);
vg[20].translate(0, 0);
vg[20].setColor(new Color(51, 51, 51, 255));
vg[20].dispose();
vg[19].dispose();
vg[22] = (VectorGraphics)vg[3].create(98, 8, 67, 20);
vg[22].setColor(new Color(51, 51, 51, 255));
vg[22].setFont(new Font("Dialog", 1, 12));
vg[22].setColor(new Color(51, 51, 51, 255));
vg[22].setFont(new Font("Dialog", 1, 12));
vg[23] = (VectorGraphics)vg[22].create();
vg[24] = (VectorGraphics)vg[23].create();
vg[24].setColor(new Color(51, 51, 51, 255));
vg[24].drawString("TestLabel2", 2, 15);
vg[24].dispose();
vg[23].translate(0, 0);
vg[23].setColor(new Color(166, 166, 166, 255));
vg[23].drawRect(0, 0, 65, 18);
vg[23].setColor(new Color(255, 255, 255, 255));
vg[23].drawLine(1, 17, 1, 1);
vg[23].drawLine(1, 1, 64, 1);
vg[23].drawLine(0, 19, 66, 19);
vg[23].drawLine(66, 19, 66, 0);
vg[23].translate(0, 0);
vg[23].dispose();
vg[22].dispose();
vg[25] = (VectorGraphics)vg[3].create(30, 10, 63, 16);
vg[25].setColor(new Color(51, 51, 51, 255));
vg[25].setFont(new Font("Dialog", 1, 12));
vg[25].setColor(new Color(51, 51, 51, 255));
vg[25].setFont(new Font("Dialog", 1, 12));
vg[26] = (VectorGraphics)vg[25].create();
vg[27] = (VectorGraphics)vg[26].create();
vg[27].setColor(new Color(51, 51, 51, 255));
vg[27].drawString("TestLabel1", 0, 13);
vg[27].dispose();
vg[26].dispose();
vg[25].dispose();
vg[3].dispose();
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[28];
public static void main(String[] args) throws Exception {
new TestLabels(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestResolution.java 0000644 0001750 0001750 00000042347 10466645574 026014 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.java.JAVAGeneralPath;
import org.freehep.graphicsio.test.TestingPanel;
public class TestResolution extends TestingPanel {
public TestResolution(String[] args) throws Exception {
super(args);
setName("TestResolution");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[2] = (VectorGraphics)vg[1].create();
vg[2].translate(0.0, 0.0);
vg[2].translate(100.0, 60.0);
vg[2].scale(30.0, 30.0);
vg[2].scale(1.0E7, 1.0E7);
vg[2].setStroke(new BasicStroke(
5.0E-8f, 1,
1, 10.0f,
null, 0.0f
));
vg[2].setColor(new Color(0, 0, 0, 255));
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0E-7f, 0.0f),
new JAVAGeneralPath.CurveTo(1.0E-7f, 5.5228476E-8f, 5.5228476E-8f, 1.0E-7f, 0.0f, 1.0E-7f),
new JAVAGeneralPath.CurveTo(-5.5228476E-8f, 1.0E-7f, -1.0E-7f, 5.5228476E-8f, -1.0E-7f, 0.0f),
new JAVAGeneralPath.CurveTo(-1.0E-7f, -5.5228476E-8f, -5.5228476E-8f, -1.0E-7f, 0.0f, -1.0E-7f),
new JAVAGeneralPath.CurveTo(5.5228476E-8f, -1.0E-7f, 1.0E-7f, -5.5228476E-8f, 1.0E-7f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].dispose();
vg[3] = (VectorGraphics)vg[1].create();
vg[3].translate(0.0, 120.0);
vg[3].translate(100.0, 60.0);
vg[3].scale(30.0, 30.0);
vg[3].scale(1000000.0, 1000000.0);
vg[3].setStroke(new BasicStroke(
5.0E-7f, 1,
1, 10.0f,
null, 0.0f
));
vg[3].setColor(new Color(0, 0, 0, 255));
vg[3].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0E-6f, 0.0f),
new JAVAGeneralPath.CurveTo(1.0E-6f, 5.5228475E-7f, 5.5228475E-7f, 1.0E-6f, 0.0f, 1.0E-6f),
new JAVAGeneralPath.CurveTo(-5.5228475E-7f, 1.0E-6f, -1.0E-6f, 5.5228475E-7f, -1.0E-6f, 0.0f),
new JAVAGeneralPath.CurveTo(-1.0E-6f, -5.5228475E-7f, -5.5228475E-7f, -1.0E-6f, 0.0f, -1.0E-6f),
new JAVAGeneralPath.CurveTo(5.5228475E-7f, -1.0E-6f, 1.0E-6f, -5.5228475E-7f, 1.0E-6f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[3].dispose();
vg[4] = (VectorGraphics)vg[1].create();
vg[4].translate(0.0, 240.0);
vg[4].translate(100.0, 60.0);
vg[4].scale(30.0, 30.0);
vg[4].scale(100000.00000000001, 100000.00000000001);
vg[4].setStroke(new BasicStroke(
5.0E-6f, 1,
1, 10.0f,
null, 0.0f
));
vg[4].setColor(new Color(0, 0, 0, 255));
vg[4].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0E-5f, 0.0f),
new JAVAGeneralPath.CurveTo(1.0E-5f, 5.5228475E-6f, 5.5228475E-6f, 1.0E-5f, 0.0f, 1.0E-5f),
new JAVAGeneralPath.CurveTo(-5.5228475E-6f, 1.0E-5f, -1.0E-5f, 5.5228475E-6f, -1.0E-5f, 0.0f),
new JAVAGeneralPath.CurveTo(-1.0E-5f, -5.5228475E-6f, -5.5228475E-6f, -1.0E-5f, 0.0f, -1.0E-5f),
new JAVAGeneralPath.CurveTo(5.5228475E-6f, -1.0E-5f, 1.0E-5f, -5.5228475E-6f, 1.0E-5f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[4].dispose();
vg[5] = (VectorGraphics)vg[1].create();
vg[5].translate(0.0, 360.0);
vg[5].translate(100.0, 60.0);
vg[5].scale(30.0, 30.0);
vg[5].scale(10000.0, 10000.0);
vg[5].setStroke(new BasicStroke(
5.0E-5f, 1,
1, 10.0f,
null, 0.0f
));
vg[5].setColor(new Color(0, 0, 0, 255));
vg[5].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0E-4f, 0.0f),
new JAVAGeneralPath.CurveTo(1.0E-4f, 5.5228476E-5f, 5.5228476E-5f, 1.0E-4f, 0.0f, 1.0E-4f),
new JAVAGeneralPath.CurveTo(-5.5228476E-5f, 1.0E-4f, -1.0E-4f, 5.5228476E-5f, -1.0E-4f, 0.0f),
new JAVAGeneralPath.CurveTo(-1.0E-4f, -5.5228476E-5f, -5.5228476E-5f, -1.0E-4f, 0.0f, -1.0E-4f),
new JAVAGeneralPath.CurveTo(5.5228476E-5f, -1.0E-4f, 1.0E-4f, -5.5228476E-5f, 1.0E-4f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[5].dispose();
vg[6] = (VectorGraphics)vg[1].create();
vg[6].translate(0.0, 480.0);
vg[6].translate(100.0, 60.0);
vg[6].scale(30.0, 30.0);
vg[6].scale(1000.0, 1000.0);
vg[6].setStroke(new BasicStroke(
5.0E-4f, 1,
1, 10.0f,
null, 0.0f
));
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0010f, 0.0f),
new JAVAGeneralPath.CurveTo(0.0010f, 5.5228476E-4f, 5.5228476E-4f, 0.0010f, 0.0f, 0.0010f),
new JAVAGeneralPath.CurveTo(-5.5228476E-4f, 0.0010f, -0.0010f, 5.5228476E-4f, -0.0010f, 0.0f),
new JAVAGeneralPath.CurveTo(-0.0010f, -5.5228476E-4f, -5.5228476E-4f, -0.0010f, 0.0f, -0.0010f),
new JAVAGeneralPath.CurveTo(5.5228476E-4f, -0.0010f, 0.0010f, -5.5228476E-4f, 0.0010f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[6].dispose();
vg[7] = (VectorGraphics)vg[1].create();
vg[7].translate(200.0, 0.0);
vg[7].translate(100.0, 60.0);
vg[7].scale(30.0, 30.0);
vg[7].scale(100.0, 100.0);
vg[7].setStroke(new BasicStroke(
0.0050f, 1,
1, 10.0f,
null, 0.0f
));
vg[7].setColor(new Color(0, 0, 0, 255));
vg[7].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.01f, 0.0f),
new JAVAGeneralPath.CurveTo(0.01f, 0.0055228476f, 0.0055228476f, 0.01f, 0.0f, 0.01f),
new JAVAGeneralPath.CurveTo(-0.0055228476f, 0.01f, -0.01f, 0.0055228476f, -0.01f, 0.0f),
new JAVAGeneralPath.CurveTo(-0.01f, -0.0055228476f, -0.0055228476f, -0.01f, 0.0f, -0.01f),
new JAVAGeneralPath.CurveTo(0.0055228476f, -0.01f, 0.01f, -0.0055228476f, 0.01f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[7].dispose();
vg[8] = (VectorGraphics)vg[1].create();
vg[8].translate(200.0, 120.0);
vg[8].translate(100.0, 60.0);
vg[8].scale(30.0, 30.0);
vg[8].scale(10.0, 10.0);
vg[8].setStroke(new BasicStroke(
0.05f, 1,
1, 10.0f,
null, 0.0f
));
vg[8].setColor(new Color(0, 0, 0, 255));
vg[8].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.1f, 0.0f),
new JAVAGeneralPath.CurveTo(0.1f, 0.055228475f, 0.055228475f, 0.1f, 0.0f, 0.1f),
new JAVAGeneralPath.CurveTo(-0.055228475f, 0.1f, -0.1f, 0.055228475f, -0.1f, 0.0f),
new JAVAGeneralPath.CurveTo(-0.1f, -0.055228475f, -0.055228475f, -0.1f, 0.0f, -0.1f),
new JAVAGeneralPath.CurveTo(0.055228475f, -0.1f, 0.1f, -0.055228475f, 0.1f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[8].dispose();
vg[9] = (VectorGraphics)vg[1].create();
vg[9].translate(200.0, 240.0);
vg[9].translate(100.0, 60.0);
vg[9].scale(30.0, 30.0);
vg[9].scale(1.0, 1.0);
vg[9].setStroke(new BasicStroke(
0.5f, 1,
1, 10.0f,
null, 0.0f
));
vg[9].setColor(new Color(0, 0, 0, 255));
vg[9].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 0.0f),
new JAVAGeneralPath.CurveTo(1.0f, 0.5522848f, 0.5522848f, 1.0f, 0.0f, 1.0f),
new JAVAGeneralPath.CurveTo(-0.5522848f, 1.0f, -1.0f, 0.5522848f, -1.0f, 0.0f),
new JAVAGeneralPath.CurveTo(-1.0f, -0.5522848f, -0.5522848f, -1.0f, 0.0f, -1.0f),
new JAVAGeneralPath.CurveTo(0.5522848f, -1.0f, 1.0f, -0.5522848f, 1.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[9].dispose();
vg[10] = (VectorGraphics)vg[1].create();
vg[10].translate(200.0, 360.0);
vg[10].translate(100.0, 60.0);
vg[10].scale(30.0, 30.0);
vg[10].scale(0.1, 0.1);
vg[10].setStroke(new BasicStroke(
5.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[10].setColor(new Color(0, 0, 0, 255));
vg[10].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(10.0f, 0.0f),
new JAVAGeneralPath.CurveTo(10.0f, 5.5228477f, 5.5228477f, 10.0f, 0.0f, 10.0f),
new JAVAGeneralPath.CurveTo(-5.5228477f, 10.0f, -10.0f, 5.5228477f, -10.0f, 0.0f),
new JAVAGeneralPath.CurveTo(-10.0f, -5.5228477f, -5.5228477f, -10.0f, 0.0f, -10.0f),
new JAVAGeneralPath.CurveTo(5.5228477f, -10.0f, 10.0f, -5.5228477f, 10.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
Paint0s1.paint(vg);
} // paint
} // class Paint0s0
private static class Paint0s1 {
public static void paint(VectorGraphics[] vg) {
vg[10].dispose();
vg[11] = (VectorGraphics)vg[1].create();
vg[11].translate(200.0, 480.0);
vg[11].translate(100.0, 60.0);
vg[11].scale(30.0, 30.0);
vg[11].scale(0.01, 0.01);
vg[11].setStroke(new BasicStroke(
50.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[11].setColor(new Color(0, 0, 0, 255));
vg[11].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(100.0f, 0.0f),
new JAVAGeneralPath.CurveTo(100.0f, 55.228474f, 55.228474f, 100.0f, 0.0f, 100.0f),
new JAVAGeneralPath.CurveTo(-55.228474f, 100.0f, -100.0f, 55.228474f, -100.0f, 0.0f),
new JAVAGeneralPath.CurveTo(-100.0f, -55.228474f, -55.228474f, -100.0f, 0.0f, -100.0f),
new JAVAGeneralPath.CurveTo(55.228474f, -100.0f, 100.0f, -55.228474f, 100.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[11].dispose();
vg[12] = (VectorGraphics)vg[1].create();
vg[12].translate(400.0, 0.0);
vg[12].translate(100.0, 60.0);
vg[12].scale(30.0, 30.0);
vg[12].scale(0.0010, 0.0010);
vg[12].setStroke(new BasicStroke(
500.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[12].setColor(new Color(0, 0, 0, 255));
vg[12].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1000.0f, 0.0f),
new JAVAGeneralPath.CurveTo(1000.0f, 552.2847f, 552.2847f, 1000.0f, 0.0f, 1000.0f),
new JAVAGeneralPath.CurveTo(-552.2847f, 1000.0f, -1000.0f, 552.2847f, -1000.0f, 0.0f),
new JAVAGeneralPath.CurveTo(-1000.0f, -552.2847f, -552.2847f, -1000.0f, 0.0f, -1000.0f),
new JAVAGeneralPath.CurveTo(552.2847f, -1000.0f, 1000.0f, -552.2847f, 1000.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[12].dispose();
vg[13] = (VectorGraphics)vg[1].create();
vg[13].translate(400.0, 120.0);
vg[13].translate(100.0, 60.0);
vg[13].scale(30.0, 30.0);
vg[13].scale(1.0E-4, 1.0E-4);
vg[13].setStroke(new BasicStroke(
5000.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[13].setColor(new Color(0, 0, 0, 255));
vg[13].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(10000.0f, 0.0f),
new JAVAGeneralPath.CurveTo(10000.0f, 5522.8477f, 5522.8477f, 10000.0f, 0.0f, 10000.0f),
new JAVAGeneralPath.CurveTo(-5522.8477f, 10000.0f, -10000.0f, 5522.8477f, -10000.0f, 0.0f),
new JAVAGeneralPath.CurveTo(-10000.0f, -5522.8477f, -5522.8477f, -10000.0f, 0.0f, -10000.0f),
new JAVAGeneralPath.CurveTo(5522.8477f, -10000.0f, 10000.0f, -5522.8477f, 10000.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[13].dispose();
vg[14] = (VectorGraphics)vg[1].create();
vg[14].translate(400.0, 240.0);
vg[14].translate(100.0, 60.0);
vg[14].scale(30.0, 30.0);
vg[14].scale(1.0E-5, 1.0E-5);
vg[14].setStroke(new BasicStroke(
50000.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[14].setColor(new Color(0, 0, 0, 255));
vg[14].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(100000.0f, 0.0f),
new JAVAGeneralPath.CurveTo(100000.0f, 55228.477f, 55228.477f, 100000.0f, 0.0f, 100000.0f),
new JAVAGeneralPath.CurveTo(-55228.477f, 100000.0f, -100000.0f, 55228.477f, -100000.0f, 0.0f),
new JAVAGeneralPath.CurveTo(-100000.0f, -55228.477f, -55228.477f, -100000.0f, 0.0f, -100000.0f),
new JAVAGeneralPath.CurveTo(55228.477f, -100000.0f, 100000.0f, -55228.477f, 100000.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[14].dispose();
vg[15] = (VectorGraphics)vg[1].create();
vg[15].translate(400.0, 360.0);
vg[15].translate(100.0, 60.0);
vg[15].scale(30.0, 30.0);
vg[15].scale(1.0E-6, 1.0E-6);
vg[15].setStroke(new BasicStroke(
500000.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[15].setColor(new Color(0, 0, 0, 255));
vg[15].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1000000.0f, 0.0f),
new JAVAGeneralPath.CurveTo(1000000.0f, 552284.75f, 552284.75f, 1000000.0f, 0.0f, 1000000.0f),
new JAVAGeneralPath.CurveTo(-552284.75f, 1000000.0f, -1000000.0f, 552284.75f, -1000000.0f, 0.0f),
new JAVAGeneralPath.CurveTo(-1000000.0f, -552284.75f, -552284.75f, -1000000.0f, 0.0f, -1000000.0f),
new JAVAGeneralPath.CurveTo(552284.75f, -1000000.0f, 1000000.0f, -552284.75f, 1000000.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[15].dispose();
vg[16] = (VectorGraphics)vg[1].create();
vg[16].translate(400.0, 480.0);
vg[16].translate(100.0, 60.0);
vg[16].scale(30.0, 30.0);
vg[16].scale(1.0E-7, 1.0E-7);
vg[16].setStroke(new BasicStroke(
5000000.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[16].setColor(new Color(0, 0, 0, 255));
vg[16].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0E7f, 0.0f),
new JAVAGeneralPath.CurveTo(1.0E7f, 5522847.5f, 5522847.5f, 1.0E7f, 0.0f, 1.0E7f),
new JAVAGeneralPath.CurveTo(-5522847.5f, 1.0E7f, -1.0E7f, 5522847.5f, -1.0E7f, 0.0f),
new JAVAGeneralPath.CurveTo(-1.0E7f, -5522847.5f, -5522847.5f, -1.0E7f, 0.0f, -1.0E7f),
new JAVAGeneralPath.CurveTo(5522847.5f, -1.0E7f, 1.0E7f, -5522847.5f, 1.0E7f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[16].dispose();
vg[1].dispose();
} // paint
} // class Paint0s1
private VectorGraphics vg[] = new VectorGraphics[17];
public static void main(String[] args) throws Exception {
new TestResolution(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestFonts.java 0000644 0001750 0001750 00000164634 10407470034 024724 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestFonts extends TestingPanel {
public TestFonts(String[] args) throws Exception {
super(args);
setName("TestFonts");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString("[java.awt.Font[family=Serif,name=Serif,style=plain,size=12]]", 10, 20);
vg[1].drawLine(10, 40, 200, 40);
vg[1].drawString("This font is a standard font: Serif.", 10, 40);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString("[java.awt.Font[family=Monotype Corsiva,name=Monotype Corsiva,style=plain,size=12]]", 10, 75);
vg[1].drawLine(10, 95, 200, 95);
vg[1].drawString("This font is a special font: Monotype Corsiva.", 10, 95);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 10, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 10, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 25, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 25, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 40, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 40, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 55, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 55, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 70, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 70, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 85, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 85, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 100, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 100, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 115, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 115, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 130, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 130, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 145, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 145, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 160, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 160, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 175, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 175, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 190, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 190, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 205, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 205, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 220, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 220, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 235, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 235, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 250, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 250, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 265, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 265, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 280, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 280, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 295, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 295, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 310, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 310, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 325, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 325, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 340, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 340, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 355, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 355, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u02d8", 370, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u02d8", 370, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u02c7", 385, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u02c7", 385, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u02c6", 400, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u02c6", 400, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u02d9", 415, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u02d9", 415, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u02ba", 430, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u02ba", 430, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u02db", 445, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u02db", 445, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u02da", 460, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u02da", 460, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u02dc", 475, 150);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u02dc", 475, 165);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ", 10, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ", 10, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" !", 25, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" !", 25, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \"", 40, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \"", 40, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" #", 55, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" #", 55, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" $", 70, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" $", 70, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" %", 85, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" %", 85, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" &", 100, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" &", 100, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" '", 115, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" '", 115, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" (", 130, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" (", 130, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" )", 145, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" )", 145, 200);
vg[1].setFont(new Font("Serif", 0, 12));
Paint0s1.paint(vg);
} // paint
} // class Paint0s0
private static class Paint0s1 {
public static void paint(VectorGraphics[] vg) {
vg[1].drawString(" *", 160, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" *", 160, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" +", 175, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" +", 175, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ,", 190, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ,", 190, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" -", 205, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" -", 205, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" .", 220, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" .", 220, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" /", 235, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" /", 235, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" 0", 250, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" 0", 250, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" 1", 265, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" 1", 265, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" 2", 280, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" 2", 280, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" 3", 295, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" 3", 295, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" 4", 310, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" 4", 310, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" 5", 325, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" 5", 325, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" 6", 340, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" 6", 340, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" 7", 355, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" 7", 355, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" 8", 370, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" 8", 370, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" 9", 385, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" 9", 385, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" :", 400, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" :", 400, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ;", 415, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ;", 415, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" <", 430, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" <", 430, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" =", 445, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" =", 445, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" >", 460, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" >", 460, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 475, 185);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 475, 200);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" @", 10, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" @", 10, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" A", 25, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" A", 25, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" B", 40, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" B", 40, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" C", 55, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" C", 55, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" D", 70, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" D", 70, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" E", 85, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" E", 85, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" F", 100, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" F", 100, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" G", 115, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" G", 115, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" H", 130, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" H", 130, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" I", 145, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" I", 145, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" J", 160, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" J", 160, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" K", 175, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" K", 175, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" L", 190, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" L", 190, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" M", 205, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" M", 205, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" N", 220, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" N", 220, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" O", 235, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" O", 235, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" P", 250, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" P", 250, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" Q", 265, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" Q", 265, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" R", 280, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" R", 280, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" S", 295, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" S", 295, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" T", 310, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" T", 310, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" U", 325, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" U", 325, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" V", 340, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" V", 340, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" W", 355, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" W", 355, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" X", 370, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" X", 370, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" Y", 385, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" Y", 385, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" Z", 400, 220);
Paint0s2.paint(vg);
} // paint
} // class Paint0s1
private static class Paint0s2 {
public static void paint(VectorGraphics[] vg) {
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" Z", 400, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" [", 415, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" [", 415, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \\", 430, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \\", 430, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ]", 445, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ]", 445, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ^", 460, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ^", 460, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" _", 475, 220);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" _", 475, 235);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" `", 10, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" `", 10, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" a", 25, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" a", 25, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" b", 40, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" b", 40, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" c", 55, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" c", 55, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" d", 70, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" d", 70, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" e", 85, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" e", 85, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" f", 100, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" f", 100, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" g", 115, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" g", 115, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" h", 130, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" h", 130, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" i", 145, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" i", 145, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" j", 160, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" j", 160, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" k", 175, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" k", 175, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" l", 190, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" l", 190, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" m", 205, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" m", 205, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" n", 220, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" n", 220, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" o", 235, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" o", 235, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" p", 250, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" p", 250, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" q", 265, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" q", 265, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" r", 280, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" r", 280, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" s", 295, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" s", 295, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" t", 310, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" t", 310, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" u", 325, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" u", 325, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" v", 340, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" v", 340, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" w", 355, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" w", 355, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" x", 370, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" x", 370, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" y", 385, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" y", 385, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" z", 400, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" z", 400, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" {", 415, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" {", 415, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" |", 430, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" |", 430, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" }", 445, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" }", 445, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ~", 460, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ~", 460, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 475, 255);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 475, 270);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u2022", 10, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u2022", 10, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u2020", 25, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u2020", 25, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u2021", 40, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u2021", 40, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u2026", 55, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u2026", 55, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" -", 70, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" -", 70, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" -", 85, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" -", 85, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u0192", 100, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u0192", 100, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u2044", 115, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u2044", 115, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u2039", 130, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u2039", 130, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u203a", 145, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u203a", 145, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u2212", 160, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
Paint0s3.paint(vg);
} // paint
} // class Paint0s2
private static class Paint0s3 {
public static void paint(VectorGraphics[] vg) {
vg[1].drawString(" \u2212", 160, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u2030", 175, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u2030", 175, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u201e", 190, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u201e", 190, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u201c", 205, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u201c", 205, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u201d", 220, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u201d", 220, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" `", 235, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" `", 235, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" '", 250, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" '", 250, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u201a", 265, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u201a", 265, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u2122", 280, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u2122", 280, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \ufb01", 295, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \ufb01", 295, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \ufb02", 310, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \ufb02", 310, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u0141", 325, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u0141", 325, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u0152", 340, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u0152", 340, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u0160", 355, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u0160", 355, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u0178", 370, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u0178", 370, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u017d", 385, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u017d", 385, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u0131", 400, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u0131", 400, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u0142", 415, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u0142", 415, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u0153", 430, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u0153", 430, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u0161", 445, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u0161", 445, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u017e", 460, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u017e", 460, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 475, 290);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 475, 305);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u20ac", 10, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u20ac", 10, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00a1", 25, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00a1", 25, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00a2", 40, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00a2", 40, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00a3", 55, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00a3", 55, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00a4", 70, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00a4", 70, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00a5", 85, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00a5", 85, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00a6", 100, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00a6", 100, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00a7", 115, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00a7", 115, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00a8", 130, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00a8", 130, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00a9", 145, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00a9", 145, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00aa", 160, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00aa", 160, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ab", 175, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ab", 175, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ac", 190, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ac", 190, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" ?", 205, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" ?", 205, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ae", 220, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ae", 220, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00af", 235, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00af", 235, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00b0", 250, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00b0", 250, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00b1", 265, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00b1", 265, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00b2", 280, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00b2", 280, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00b3", 295, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00b3", 295, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00b4", 310, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00b4", 310, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u03bc", 325, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u03bc", 325, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00b6", 340, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00b6", 340, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00b7", 355, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00b7", 355, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00b8", 370, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00b8", 370, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00b9", 385, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00b9", 385, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ba", 400, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ba", 400, 340);
Paint0s4.paint(vg);
} // paint
} // class Paint0s3
private static class Paint0s4 {
public static void paint(VectorGraphics[] vg) {
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00bb", 415, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00bb", 415, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00bc", 430, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00bc", 430, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00bd", 445, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00bd", 445, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00be", 460, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00be", 460, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00bf", 475, 325);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00bf", 475, 340);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00c0", 10, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00c0", 10, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00c1", 25, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00c1", 25, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00c2", 40, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00c2", 40, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00c3", 55, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00c3", 55, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00c4", 70, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00c4", 70, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00c5", 85, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00c5", 85, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00c6", 100, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00c6", 100, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00c7", 115, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00c7", 115, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00c8", 130, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00c8", 130, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00c9", 145, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00c9", 145, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ca", 160, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ca", 160, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00cb", 175, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00cb", 175, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00cc", 190, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00cc", 190, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00cd", 205, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00cd", 205, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ce", 220, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ce", 220, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00cf", 235, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00cf", 235, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00d0", 250, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00d0", 250, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00d1", 265, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00d1", 265, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00d3", 280, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00d3", 280, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00d2", 295, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00d2", 295, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00d4", 310, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00d4", 310, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00d5", 325, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00d5", 325, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00d6", 340, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00d6", 340, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00d7", 355, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00d7", 355, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00d8", 370, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00d8", 370, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00d9", 385, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00d9", 385, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00da", 400, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00da", 400, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00db", 415, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00db", 415, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00dc", 430, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00dc", 430, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00dd", 445, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00dd", 445, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00de", 460, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00de", 460, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00df", 475, 360);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00df", 475, 375);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00e0", 10, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00e0", 10, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00e1", 25, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00e1", 25, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00e2", 40, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00e2", 40, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00e3", 55, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00e3", 55, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00e4", 70, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00e4", 70, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00e5", 85, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00e5", 85, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00e6", 100, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00e6", 100, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00e7", 115, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00e7", 115, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00e8", 130, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00e8", 130, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00e9", 145, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00e9", 145, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ea", 160, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ea", 160, 410);
vg[1].setFont(new Font("Serif", 0, 12));
Paint0s5.paint(vg);
} // paint
} // class Paint0s4
private static class Paint0s5 {
public static void paint(VectorGraphics[] vg) {
vg[1].drawString(" \u00eb", 175, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00eb", 175, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ec", 190, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ec", 190, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ed", 205, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ed", 205, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ee", 220, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ee", 220, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ef", 235, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ef", 235, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00f0", 250, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00f0", 250, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00f1", 265, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00f1", 265, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00f2", 280, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00f2", 280, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00f3", 295, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00f3", 295, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00f4", 310, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00f4", 310, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00f5", 325, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00f5", 325, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00f6", 340, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00f6", 340, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00f7", 355, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00f7", 355, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00f8", 370, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00f8", 370, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00f9", 385, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00f9", 385, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00fa", 400, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00fa", 400, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00fb", 415, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00fb", 415, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00fc", 430, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00fc", 430, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00fd", 445, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00fd", 445, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00fe", 460, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00fe", 460, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString(" \u00ff", 475, 395);
vg[1].setFont(new Font("Monotype Corsiva", 0, 12));
vg[1].drawString(" \u00ff", 475, 410);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString("Symbol Font:", 20, 485);
vg[1].setFont(new Font("Symbol", 0, 12));
vg[1].drawString("ABC abc 123 .,!", 200, 485);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString("Dingbats:", 20, 505);
vg[1].setFont(new Font("ZapfDingbats", 0, 12));
vg[1].drawString("ABC abc 123 .,!", 200, 505);
vg[1].setFont(new Font("Serif", 0, 12));
vg[1].drawString("Unicode chars (greek, dingbats): \u03b1 \u03b2 \u03b3 \u263a \u2665 \u2729 \u270c in Serif", 20, 525);
vg[1].setFont(new Font("SansSerif", 0, 12));
vg[1].drawString("Unicode chars (greek, dingbats): \u03b1 \u03b2 \u03b3 \u263a \u2665 \u2729 \u270c in SansSerif", 20, 545);
vg[1].setFont(new Font("Dialog", 0, 12));
vg[1].drawString("Unicode chars (greek, dingbats): \u03b1 \u03b2 \u03b3 \u263a \u2665 \u2729 \u270c in Dialog", 20, 565);
vg[1].setFont(new Font("Monospaced", 0, 12));
vg[1].drawString("Unicode chars (greek, dingbats): \u03b1 \u03b2 \u03b3 \u263a \u2665 \u2729 \u270c in Monospaced", 20, 585);
vg[1].dispose();
} // paint
} // class Paint0s5
private VectorGraphics vg[] = new VectorGraphics[2];
public static void main(String[] args) throws Exception {
new TestFonts(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestGraphicsContexts.java 0000644 0001750 0001750 00000005213 10466645574 027130 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestGraphicsContexts extends TestingPanel {
public TestGraphicsContexts(String[] args) throws Exception {
super(args);
setName("TestGraphicsContexts");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setStroke(new BasicStroke(
5.0f, 2,
0, 10.0f,
null, 0.0f
));
vg[1].drawLine(200, 25, 350, 25);
vg[1].drawSymbol(400, 25, 40, 5);
vg[2] = (VectorGraphics)vg[1].create();
vg[2].setStroke(new BasicStroke(
10.0f, 0,
2, 10.0f,
new float[] {
5.0f, 4.0f
}, 0.0f
));
vg[2].setColor(new Color(0, 255, 0, 255));
vg[2].translate(-137.5, 0.0);
vg[2].scale(1.5, 1.0);
vg[2].drawLine(200, 125, 350, 125);
vg[2].drawSymbol(400, 125, 40, 6);
vg[3] = (VectorGraphics)vg[2].create();
vg[3].setStroke(new BasicStroke(
2.0f, 2,
0, 10.0f,
null, 0.0f
));
vg[3].setColor(new Color(0, 0, 255, 255));
vg[3].drawLine(200, 225, 350, 225);
vg[3].fillSymbol(400, 225, 40, 7);
vg[3].dispose();
vg[2].drawLine(200, 325, 350, 325);
vg[2].drawSymbol(400, 325, 40, 6);
vg[2].dispose();
vg[1].drawLine(200, 425, 350, 425);
vg[1].drawSymbol(400, 425, 40, 5);
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[4];
public static void main(String[] args) throws Exception {
new TestGraphicsContexts(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestOffset.java 0000644 0001750 0001750 00000003135 10407470034 025045 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestOffset extends TestingPanel {
public TestOffset(String[] args) throws Exception {
super(args);
setName("TestOffset");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setLineWidth(4.0);
vg[1].translate(300.0, 300.0);
vg[1].drawLine(-290.0, -290.0, 290.0, 290.0);
vg[1].drawLine(-290.0, 290.0, 290.0, -290.0);
vg[1].drawRect(-290.0, -290.0, 580.0, 580.0);
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[2];
public static void main(String[] args) throws Exception {
new TestOffset(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestAll.java 0000644 0001750 0001750 00000027476 10407470034 024345 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.TexturePaint;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import org.freehep.graphics2d.TagString;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.java.JAVAGeneralPath;
import org.freehep.graphicsio.test.TestingPanel;
public class TestAll extends TestingPanel {
public TestAll(String[] args) throws Exception {
super(args);
setName("TestAll");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setPaint(new GradientPaint(
new Point2D.Double(0.0, 10.0), new Color(0, 0, 255, 255),
new Point2D.Double(600.0, 10.0), new Color(255, 255, 255, 255), false
));
vg[1].fillRect(0.0, 10.0, 600.0, 30.0);
vg[1].setFont(new Font("Helvetica", 1, 18));
vg[1].setPaint(new GradientPaint(
new Point2D.Double(0.0, 10.0), new Color(0, 0, 0, 255),
new Point2D.Double(600.0, 10.0), new Color(0, 0, 255, 255), false
));
vg[1].drawString("Testing org.freehep.graphicsio.java.JAVAGraphics2D", 10, 30);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(37.5, 112.5, 150.0, 150.0);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(37.5, 112.5, 150.0, 150.0);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(59.46699141100894, 134.46699141100893, 106.06601717798212, 106.06601717798212);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(59.46699141100894, 134.46699141100893, 106.06601717798212, 106.06601717798212);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(75.0, 150.0, 74.99999999999999, 74.99999999999999);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(75.0, 150.0, 74.99999999999999, 74.99999999999999);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(85.98349570550448, 160.98349570550448, 53.03300858899105, 53.03300858899105);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(85.98349570550448, 160.98349570550448, 53.03300858899105, 53.03300858899105);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(93.75, 168.75, 37.499999999999986, 37.499999999999986);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(93.75, 168.75, 37.499999999999986, 37.499999999999986);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(99.24174785275224, 174.24174785275224, 26.51650429449552, 26.51650429449552);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(99.24174785275224, 174.24174785275224, 26.51650429449552, 26.51650429449552);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(103.125, 178.125, 18.74999999999999, 18.74999999999999);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(103.125, 178.125, 18.74999999999999, 18.74999999999999);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(105.87087392637612, 180.87087392637613, 13.258252147247758, 13.258252147247758);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(105.87087392637612, 180.87087392637613, 13.258252147247758, 13.258252147247758);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(107.8125, 182.8125, 9.374999999999993, 9.374999999999993);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(107.8125, 182.8125, 9.374999999999993, 9.374999999999993);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(109.18543696318807, 184.18543696318807, 6.629126073623878, 6.629126073623878);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(109.18543696318807, 184.18543696318807, 6.629126073623878, 6.629126073623878);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(110.15625, 185.15625, 4.6874999999999964, 4.6874999999999964);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(110.15625, 185.15625, 4.6874999999999964, 4.6874999999999964);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(110.84271848159403, 185.84271848159403, 3.314563036811939, 3.314563036811939);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(110.84271848159403, 185.84271848159403, 3.314563036811939, 3.314563036811939);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(111.328125, 186.328125, 2.3437499999999982, 2.3437499999999982);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(111.328125, 186.328125, 2.3437499999999982, 2.3437499999999982);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(111.67135924079702, 186.67135924079702, 1.6572815184059695, 1.6572815184059695);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(111.67135924079702, 186.67135924079702, 1.6572815184059695, 1.6572815184059695);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(111.9140625, 186.9140625, 1.1718749999999991, 1.1718749999999991);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillOval(111.9140625, 186.9140625, 1.1718749999999991, 1.1718749999999991);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setFont(new Font("TimesRoman", 0, 11));
vg[1].drawString(new TagString("The drawString methods in VectorGraphics support"), 225.0, 122.5);
vg[1].drawString(new TagString("output of strings using a subset of the HTML language."), 225.0, 136.5);
vg[1].setColor(new Color(255, 0, 0, 255));
vg[1].drawSymbol(300.0, 187.5, 12.0, 0);
vg[1].fillSymbol(300.0, 202.5, 10.0, 0);
vg[1].drawSymbol(315.0, 187.5, 12.0, 1);
vg[1].fillSymbol(315.0, 202.5, 10.0, 1);
vg[1].drawSymbol(330.0, 187.5, 12.0, 2);
vg[1].fillSymbol(330.0, 202.5, 10.0, 2);
vg[1].drawSymbol(345.0, 187.5, 12.0, 3);
vg[1].fillSymbol(345.0, 202.5, 10.0, 3);
vg[1].drawSymbol(360.0, 187.5, 12.0, 4);
vg[1].fillSymbol(360.0, 202.5, 10.0, 4);
vg[1].drawSymbol(375.0, 187.5, 12.0, 5);
vg[1].fillSymbol(375.0, 202.5, 10.0, 5);
vg[1].drawSymbol(390.0, 187.5, 12.0, 6);
vg[1].fillSymbol(390.0, 202.5, 10.0, 6);
vg[1].drawSymbol(405.0, 187.5, 12.0, 7);
vg[1].fillSymbol(405.0, 202.5, 10.0, 7);
vg[1].drawSymbol(420.0, 187.5, 12.0, 8);
vg[1].fillSymbol(420.0, 202.5, 10.0, 8);
vg[1].drawSymbol(435.0, 187.5, 12.0, 9);
vg[1].fillSymbol(435.0, 202.5, 10.0, 9);
vg[1].setPaint(new TexturePaint(
(BufferedImage)
new BufferedImage(200, 200, BufferedImage.TYPE_INT_ARGB), new Rectangle2D.Double(0.0, 0.0, 200.0, 200.0)));
vg[1].fillRect(0.0, 300.0, 300.0, 300.0);
vg[1].setPaint(new Color(0, 0, 0, 255));
vg[1].setFont(new Font("Impact", 1, 60));
vg[1].drawString("\u2729Impact\u2729", 150.0, 450.0, 2, 0);
vg[2] = (VectorGraphics)vg[1].create();
vg[2].translate(300.0, 300.0);
vg[2].setStroke(new BasicStroke(
8.0f, 0,
2, 10.0f,
null, 0.0f
));
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[3] = (VectorGraphics)vg[2].create();
vg[3].setColor(new Color(0, 0, 0, 255));
vg[3].setStroke(new BasicStroke(
3.0f, 1,
1, 10.0f,
new float[] {
10.0f, 5.0f, 2.0f, 5.0f
}, 0.0f
));
vg[3].rotate(0.6283185307179586);
vg[3].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[3].dispose();
vg[2].setLineWidth(1);
vg[2].shear(0.5, 0.5);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(25.0f, 50.0f),
new JAVAGeneralPath.LineTo(-25.0f, 50.0f),
new JAVAGeneralPath.LineTo(25.0f, -50.0f),
new JAVAGeneralPath.LineTo(-25.0f, -50.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].dispose();
vg[4] = (VectorGraphics)vg[1].create();
vg[4].setColor(new Color(0, 0, 0, 255));
vg[4].translate(450.0, 450.0);
vg[4].fillOval(-60.0, -60.0, 120.0, 120.0);
vg[4].setStroke(new BasicStroke(
4.0f, 1,
1, 10.0f,
null, 0.0f
));
vg[4].drawOval(-84.0, -84.0, 168.0, 168.0);
vg[4].setFont(new Font("TimesRoman", 1, 16));
vg[4].drawString("O", 0.0, -66.0);
vg[4].rotate(0.7853981633974483);
vg[4].drawString("R", 0.0, -66.0);
vg[4].rotate(0.7853981633974483);
vg[4].drawString("A", 0.0, -66.0);
vg[4].rotate(0.7853981633974483);
vg[4].drawString("E", 0.0, -66.0);
vg[4].rotate(0.7853981633974483);
vg[4].drawString("T", 0.0, -66.0);
vg[4].rotate(0.7853981633974483);
vg[4].drawString("L", 0.0, -66.0);
vg[4].rotate(0.7853981633974483);
vg[4].drawString("A", 0.0, -66.0);
vg[4].rotate(0.7853981633974483);
vg[4].drawString("B", 0.0, -66.0);
vg[4].rotate(0.7853981633974483);
vg[4].dispose();
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[5];
public static void main(String[] args) throws Exception {
new TestAll(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestImages.java 0000644 0001750 0001750 00000004546 10407470034 025033 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestImages extends TestingPanel {
public TestImages(String[] args) throws Exception {
super(args);
setName("TestImages");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setBackground(new Color(255, 200, 0, 255));
vg[1].clearRect(0, 0, 600, 600);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 0, 0, new Color(0, 0, 0, 255), null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 225, 150, 75, 150, new Color(0, 0, 0, 255), null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 300, 0, 412, 225, 64, 64, 192, 192, new Color(0, 0, 0, 255), null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 450, 0, 525, 300, 256, 256, 0, 0, new Color(0, 0, 0, 255), null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 0, 300, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 225, 450, 75, 150, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 300, 300, 412, 525, 64, 64, 192, 192, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 450, 300, 525, 600, 256, 256, 0, 0, null);
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[2];
public static void main(String[] args) throws Exception {
new TestImages(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestShapes.java 0000644 0001750 0001750 00000017650 10407470034 025051 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestShapes extends TestingPanel {
public TestShapes(String[] args) throws Exception {
super(args);
setName("TestShapes");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(0, 0, 0, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setColor(new Color(255, 0, 0, 255));
vg[1].drawLine(5, 67, 95, 7);
vg[1].setColor(new Color(0, 255, 0, 255));
vg[1].drawRect(105, 7, 90, 61);
vg[1].setColor(new Color(0, 0, 255, 255));
vg[1].drawRoundRect(205, 7, 90, 61, 50, 50);
vg[1].setColor(new Color(0, 255, 255, 255));
vg[1].drawArc(305, 7, 90, 61, 90, 135);
vg[1].setColor(new Color(255, 0, 255, 255));
vg[1].drawOval(405, 7, 90, 61);
vg[1].setColor(new Color(255, 255, 0, 255));
vg[1].drawPolygon(new int[] {
505, 595, 505, 595
}, new int[] {
7, 68, 68, 7
}, 4);
vg[1].setColor(new Color(255, 0, 0, 255));
vg[1].drawPolyline(new int[] {
5, 95, 5, 95
}, new int[] {
82, 143, 143, 82
}, 4);
vg[1].setColor(new Color(0, 255, 0, 255));
vg[1].fillRect(105, 82, 90, 61);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].drawRect(105, 82, 90, 61);
vg[1].setColor(new Color(0, 0, 255, 255));
vg[1].fillRoundRect(205, 82, 90, 61, 50, 50);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setColor(new Color(0, 255, 255, 255));
vg[1].drawArc(305, 82, 90, 61, 90, 135);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setColor(new Color(255, 0, 255, 255));
vg[1].fillOval(405, 82, 90, 61);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setColor(new Color(255, 255, 0, 255));
vg[1].fillPolygon(new int[] {
505, 595, 505, 595
}, new int[] {
82, 143, 143, 82
}, 4);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].drawPolygon(new int[] {
505, 595, 505, 595
}, new int[] {
82, 143, 143, 82
}, 4);
vg[1].setLineWidth(5.0);
vg[1].setColor(new Color(255, 0, 0, 255));
vg[1].drawLine(5, 217, 95, 157);
vg[1].setColor(new Color(0, 255, 0, 255));
vg[1].drawRect(105, 157, 90, 61);
vg[1].setColor(new Color(0, 0, 255, 255));
vg[1].drawRoundRect(205, 157, 90, 61, 50, 50);
vg[1].setColor(new Color(0, 255, 255, 255));
vg[1].drawArc(305, 157, 90, 61, 90, 135);
vg[1].setColor(new Color(255, 0, 255, 255));
vg[1].drawOval(405, 157, 90, 61);
vg[1].setColor(new Color(255, 255, 0, 255));
vg[1].drawPolygon(new int[] {
505, 595, 505, 595
}, new int[] {
157, 218, 218, 157
}, 4);
vg[1].setColor(new Color(255, 0, 0, 255));
vg[1].drawPolyline(new int[] {
5, 95, 5, 95
}, new int[] {
232, 293, 293, 232
}, 4);
vg[1].setColor(new Color(0, 255, 0, 255));
vg[1].fillRect(105, 232, 90, 61);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].drawRect(105, 232, 90, 61);
vg[1].setColor(new Color(0, 0, 255, 255));
vg[1].fillRoundRect(205, 232, 90, 61, 50, 50);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setColor(new Color(0, 255, 255, 255));
vg[1].drawArc(305, 232, 90, 61, 90, 135);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setColor(new Color(255, 0, 255, 255));
vg[1].fillOval(405, 232, 90, 61);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setColor(new Color(255, 255, 0, 255));
vg[1].fillPolygon(new int[] {
505, 595, 505, 595
}, new int[] {
232, 293, 293, 232
}, 4);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].drawPolygon(new int[] {
505, 595, 505, 595
}, new int[] {
232, 293, 293, 232
}, 4);
vg[1].setFont(new Font("SansSerif", 0, 14));
vg[1].drawString("SansSerif: The quick brown fox jumped over the lazy dog.", 5, 307);
vg[1].setFont(new Font("SansSerif", 1, 14));
vg[1].drawString("SansSerif (bold): The quick brown fox jumped over the lazy dog.", 5, 323);
vg[1].setFont(new Font("SansSerif", 2, 14));
vg[1].drawString("SansSerif (italic): The quick brown fox jumped over the lazy dog.", 5, 339);
vg[1].setFont(new Font("Serif", 0, 14));
vg[1].drawString("Serif: The quick brown fox jumped over the lazy dog.", 5, 355);
vg[1].setFont(new Font("Serif", 1, 14));
vg[1].drawString("Serif (bold): The quick brown fox jumped over the lazy dog.", 5, 371);
vg[1].setFont(new Font("Serif", 2, 14));
vg[1].drawString("Serif (italic): The quick brown fox jumped over the lazy dog.", 5, 387);
vg[1].setFont(new Font("Monospaced", 0, 14));
vg[1].drawString("Monospaced: The quick brown fox jumped over the lazy dog.", 5, 403);
vg[1].setFont(new Font("Monospaced", 1, 14));
vg[1].drawString("Monospaced (bold): The quick brown fox jumped over the lazy dog.", 5, 419);
vg[1].setFont(new Font("Monospaced", 2, 14));
vg[1].drawString("Monospaced (italic): The quick brown fox jumped over the lazy dog.", 5, 435);
vg[1].setFont(new Font("Symbol", 0, 14));
vg[1].drawString("Symbol: The quick brown fox jumped over the lazy dog.", 5, 451);
vg[1].setFont(new Font("Symbol", 1, 14));
vg[1].drawString("Symbol (bold): The quick brown fox jumped over the lazy dog.", 5, 467);
vg[1].setFont(new Font("Symbol", 2, 14));
vg[1].drawString("Symbol (italic): The quick brown fox jumped over the lazy dog.", 5, 483);
vg[1].setFont(new Font("ZapfDingbats", 0, 14));
vg[1].drawString("ZapfDingbats: The quick brown fox jumped over the lazy dog.", 5, 499);
vg[1].setFont(new Font("ZapfDingbats", 1, 14));
vg[1].drawString("ZapfDingbats (bold): The quick brown fox jumped over the lazy dog.", 5, 515);
vg[1].setFont(new Font("ZapfDingbats", 2, 14));
vg[1].drawString("ZapfDingbats (italic): The quick brown fox jumped over the lazy dog.", 5, 531);
vg[1].setFont(new Font("Monospaced", 0, 14));
vg[1].drawString("Unbalanced (( )) ))) ((( TEST! )T( (T)", 5, 547);
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[2];
public static void main(String[] args) throws Exception {
new TestShapes(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestHTML.java 0000644 0001750 0001750 00000012664 10407470034 024372 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestHTML extends TestingPanel {
public TestHTML(String[] args) throws Exception {
super(args);
setName("TestHTML");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[2] = (VectorGraphics)vg[1].create();
vg[2].setColor(new Color(238, 238, 238, 255));
vg[2].fillRect(0, 0, 600, 600);
vg[2].dispose();
vg[3] = (VectorGraphics)vg[1].create();
vg[4] = (VectorGraphics)vg[3].create(179, 5, 241, 38);
vg[4].setColor(new Color(51, 51, 51, 255));
vg[4].setFont(new Font("Dialog", 0, 12));
vg[4].setColor(new Color(51, 51, 51, 255));
vg[4].setFont(new Font("Dialog", 0, 12));
vg[5] = (VectorGraphics)vg[4].create();
vg[6] = (VectorGraphics)vg[5].create();
vg[6].setColor(new Color(255, 255, 255, 255));
vg[6].fillRect(0, 0, 241, 38);
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].setFont(new Font("Serif", 0, 14));
vg[6].drawChars(new char[] {
'\n', '<', 'V', 'e', 'c', 't', 'o', 'r'
}, 1, 7, 3, 25);
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].setFont(new Font("Serif", 1, 12));
vg[6].drawChars(new char[] {
'\n', '<', 'V', 'e', 'c', 't', 'o', 'r', 'G', 'r', 'a', 'p', 'h', 'i', 'c', 's'
}, 8, 8, 49, 17);
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].setFont(new Font("Serif", 0, 14));
vg[6].drawChars(new char[] {
'\n', '<', 'V', 'e', 'c', 't', 'o', 'r', 'G', 'r', 'a', 'p', 'h', 'i', 'c', 's', ' ', '&', ' ', 'A', 'd', 'a', 'p', 't', 'e', 'r'
}, 16, 10, 96, 25);
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].setFont(new Font("Serif", 2, 12));
vg[6].drawChars(new char[] {
'\n', '<', 'V', 'e', 'c', 't', 'o', 'r', 'G', 'r', 'a', 'p', 'h', 'i', 'c', 's', ' ', '&', ' ', 'A', 'd', 'a', 'p', 't', 'e', 'r', 'C', 'a', 'r', 'd'
}, 26, 4, 159, 32);
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].setFont(new Font("Serif", 0, 14));
vg[6].drawChars(new char[] {
'\n', '<', 'V', 'e', 'c', 't', 'o', 'r', 'G', 'r', 'a', 'p', 'h', 'i', 'c', 's', ' ', '&', ' ', 'A', 'd', 'a', 'p', 't', 'e', 'r', 'C', 'a', 'r', 'd', ' ', '=', ' ', 'e'
}, 30, 4, 184, 25);
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].setFont(new Font("Serif", 0, 12));
vg[6].drawChars(new char[] {
'\n', '<', 'V', 'e', 'c', 't', 'o', 'r', 'G', 'r', 'a', 'p', 'h', 'i', 'c', 's', ' ', '&', ' ', 'A', 'd', 'a', 'p', 't', 'e', 'r', 'C', 'a', 'r', 'd', ' ', '=', ' ', 'e', 'x'
}, 34, 1, 206, 17);
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].setFont(new Font("Serif", 0, 12));
vg[6].drawChars(new char[] {
'\n', '<', 'V', 'e', 'c', 't', 'o', 'r', 'G', 'r', 'a', 'p', 'h', 'i', 'c', 's', ' ', '&', ' ', 'A', 'd', 'a', 'p', 't', 'e', 'r', 'C', 'a', 'r', 'd', ' ', '=', ' ', 'e', 'x', '2'
}, 35, 1, 211, 17);
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].setFont(new Font("Serif", 0, 12));
vg[6].drawChars(new char[] {
'\n', '<', 'V', 'e', 'c', 't', 'o', 'r', 'G', 'r', 'a', 'p', 'h', 'i', 'c', 's', ' ', '&', ' ', 'A', 'd', 'a', 'p', 't', 'e', 'r', 'C', 'a', 'r', 'd', ' ', '=', ' ', 'e', 'x', '2', 'y'
}, 36, 1, 217, 17);
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].setFont(new Font("Serif", 0, 12));
vg[6].drawChars(new char[] {
'\n', '<', 'V', 'e', 'c', 't', 'o', 'r', 'G', 'r', 'a', 'p', 'h', 'i', 'c', 's', ' ', '&', ' ', 'A', 'd', 'a', 'p', 't', 'e', 'r', 'C', 'a', 'r', 'd', ' ', '=', ' ', 'e', 'x', '2', 'y', '3'
}, 37, 1, 224, 17);
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].setFont(new Font("Serif", 0, 14));
vg[6].drawChars(new char[] {
'\n', '<', 'V', 'e', 'c', 't', 'o', 'r', 'G', 'r', 'a', 'p', 'h', 'i', 'c', 's', ' ', '&', ' ', 'A', 'd', 'a', 'p', 't', 'e', 'r', 'C', 'a', 'r', 'd', ' ', '=', ' ', 'e', 'x', '2', 'y', '3', '>'
}, 38, 1, 230, 25);
vg[6].dispose();
vg[5].dispose();
vg[4].dispose();
vg[3].dispose();
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[7];
public static void main(String[] args) throws Exception {
new TestHTML(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestTaggedString.java 0000644 0001750 0001750 00000004237 10407470034 026205 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.TagString;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestTaggedString extends TestingPanel {
public TestTaggedString(String[] args) throws Exception {
super(args);
setName("TestTaggedString");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setFont(new Font("SansSerif", 0, 30));
vg[1].drawString(new TagString("AntBullCatDogEelFrogGeckoHog"), 0.0, 150.0);
vg[1].setFont(new Font("Serif", 0, 30));
vg[1].drawString(new TagString("AntBullCatDogEelFrogGeckoHog"), 0.0, 300.0);
vg[1].setFont(new Font("Monospaced", 0, 30));
vg[1].drawString(new TagString("AntBullCatDogEelFrogGeckoHog"), 0.0, 450.0);
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[2];
public static void main(String[] args) throws Exception {
new TestTaggedString(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestColors.java 0000644 0001750 0001750 00000006355 10407470034 025067 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestColors extends TestingPanel {
public TestColors(String[] args) throws Exception {
super(args);
setName("TestColors");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 200);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].fillRect(0, 200, 600, 200);
vg[1].setColor(new Color(255, 0, 0, 128));
vg[1].fillOval(59, 9, 110, 110);
vg[1].setColor(new Color(0, 255, 0, 128));
vg[1].fillOval(132, 9, 110, 110);
vg[1].setColor(new Color(0, 0, 255, 128));
vg[1].fillOval(95, 82, 110, 110);
vg[1].setColor(new Color(0, 255, 255, 128));
vg[1].fillOval(359, 9, 110, 110);
vg[1].setColor(new Color(255, 0, 255, 128));
vg[1].fillOval(432, 9, 110, 110);
vg[1].setColor(new Color(255, 255, 0, 128));
vg[1].fillOval(395, 82, 110, 110);
vg[1].setColor(new Color(255, 0, 0, 128));
vg[1].fillOval(59, 209, 110, 110);
vg[1].setColor(new Color(0, 255, 0, 128));
vg[1].fillOval(132, 209, 110, 110);
vg[1].setColor(new Color(0, 0, 255, 128));
vg[1].fillOval(95, 282, 110, 110);
vg[1].setColor(new Color(0, 255, 255, 128));
vg[1].fillOval(359, 209, 110, 110);
vg[1].setColor(new Color(255, 0, 255, 128));
vg[1].fillOval(432, 209, 110, 110);
vg[1].setColor(new Color(255, 255, 0, 128));
vg[1].fillOval(395, 282, 110, 110);
vg[1].setColor(new Color(255, 0, 0, 128));
vg[1].fillOval(59, 409, 110, 110);
vg[1].setColor(new Color(0, 255, 0, 128));
vg[1].fillOval(132, 409, 110, 110);
vg[1].setColor(new Color(0, 0, 255, 128));
vg[1].fillOval(95, 482, 110, 110);
vg[1].setColor(new Color(0, 255, 255, 128));
vg[1].fillOval(359, 409, 110, 110);
vg[1].setColor(new Color(255, 0, 255, 128));
vg[1].fillOval(432, 409, 110, 110);
vg[1].setColor(new Color(255, 255, 0, 128));
vg[1].fillOval(395, 482, 110, 110);
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[2];
public static void main(String[] args) throws Exception {
new TestColors(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestFontDerivation.java 0000644 0001750 0001750 00000012257 10407470034 026557 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestFontDerivation extends TestingPanel {
public TestFontDerivation(String[] args) throws Exception {
super(args);
setName("TestFontDerivation");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[2] = (VectorGraphics)vg[1].create();
vg[2].translate(300, 300);
vg[2].setColor(new Color(255, 255, 255, 255));
vg[2].fillRect(-300, -300, 600, 600);
vg[2].setColor(new Color(0, 0, 0, 255));
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].setColor(new Color(0, 0, 255, 255));
vg[2].setFont(new Font("Dialog", 0, 12));
vg[2].drawString("FreeHEP", 0, 0);
vg[2].dispose();
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[3];
public static void main(String[] args) throws Exception {
new TestFontDerivation(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestLineStyles.java 0000644 0001750 0001750 00000020667 10407470034 025723 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.java.JAVAGeneralPath;
import org.freehep.graphicsio.test.TestingPanel;
public class TestLineStyles extends TestingPanel {
public TestLineStyles(String[] args) throws Exception {
super(args);
setName("TestLineStyles");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].setStroke(new BasicStroke(
0.0f, 2,
0, 10.0f,
null, 0.0f
));
vg[1].drawLine(0, 15, 600, 15);
vg[1].setStroke(new BasicStroke(
3.0f, 0,
2, 10.0f,
new float[] {
5.0f, 2.0f
}, 0.0f
));
vg[1].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(166.0f, 166.0f),
new JAVAGeneralPath.LineTo(34.0f, 166.0f),
new JAVAGeneralPath.LineTo(34.0f, 133.0f),
new JAVAGeneralPath.LineTo(166.0f, 133.0f),
new JAVAGeneralPath.LineTo(166.0f, 67.0f),
new JAVAGeneralPath.LineTo(34.0f, 67.0f),
new JAVAGeneralPath.LineTo(34.0f, 34.0f),
new JAVAGeneralPath.LineTo(166.0f, 34.0f)
}));
vg[1].setStroke(new BasicStroke(
3.0f, 1,
0, 10.0f,
new float[] {
0.0f, 7.0f
}, 0.0f
));
vg[1].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(366.0f, 166.0f),
new JAVAGeneralPath.LineTo(234.0f, 166.0f),
new JAVAGeneralPath.LineTo(234.0f, 133.0f),
new JAVAGeneralPath.LineTo(366.0f, 133.0f),
new JAVAGeneralPath.LineTo(366.0f, 67.0f),
new JAVAGeneralPath.LineTo(234.0f, 67.0f),
new JAVAGeneralPath.LineTo(234.0f, 34.0f),
new JAVAGeneralPath.LineTo(366.0f, 34.0f)
}));
vg[1].setStroke(new BasicStroke(
3.0f, 2,
1, 10.0f,
new float[] {
10.0f, 5.0f, 2.0f, 5.0f
}, 0.0f
));
vg[1].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(566.0f, 166.0f),
new JAVAGeneralPath.LineTo(434.0f, 166.0f),
new JAVAGeneralPath.LineTo(434.0f, 133.0f),
new JAVAGeneralPath.LineTo(566.0f, 133.0f),
new JAVAGeneralPath.LineTo(566.0f, 67.0f),
new JAVAGeneralPath.LineTo(434.0f, 67.0f),
new JAVAGeneralPath.LineTo(434.0f, 34.0f),
new JAVAGeneralPath.LineTo(566.0f, 34.0f)
}));
vg[1].setStroke(new BasicStroke(
5.0f, 0,
2, 10.0f,
new float[] {
5.0f, 2.0f
}, 0.0f
));
vg[1].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(166.0f, 366.0f),
new JAVAGeneralPath.LineTo(34.0f, 366.0f),
new JAVAGeneralPath.LineTo(34.0f, 333.0f),
new JAVAGeneralPath.LineTo(166.0f, 333.0f),
new JAVAGeneralPath.LineTo(166.0f, 267.0f),
new JAVAGeneralPath.LineTo(34.0f, 267.0f),
new JAVAGeneralPath.LineTo(34.0f, 234.0f),
new JAVAGeneralPath.LineTo(166.0f, 234.0f)
}));
vg[1].setStroke(new BasicStroke(
5.0f, 1,
0, 10.0f,
new float[] {
0.0f, 7.0f
}, 0.0f
));
vg[1].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(366.0f, 366.0f),
new JAVAGeneralPath.LineTo(234.0f, 366.0f),
new JAVAGeneralPath.LineTo(234.0f, 333.0f),
new JAVAGeneralPath.LineTo(366.0f, 333.0f),
new JAVAGeneralPath.LineTo(366.0f, 267.0f),
new JAVAGeneralPath.LineTo(234.0f, 267.0f),
new JAVAGeneralPath.LineTo(234.0f, 234.0f),
new JAVAGeneralPath.LineTo(366.0f, 234.0f)
}));
vg[1].setStroke(new BasicStroke(
5.0f, 2,
1, 10.0f,
new float[] {
10.0f, 5.0f, 2.0f, 5.0f
}, 0.0f
));
vg[1].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(566.0f, 366.0f),
new JAVAGeneralPath.LineTo(434.0f, 366.0f),
new JAVAGeneralPath.LineTo(434.0f, 333.0f),
new JAVAGeneralPath.LineTo(566.0f, 333.0f),
new JAVAGeneralPath.LineTo(566.0f, 267.0f),
new JAVAGeneralPath.LineTo(434.0f, 267.0f),
new JAVAGeneralPath.LineTo(434.0f, 234.0f),
new JAVAGeneralPath.LineTo(566.0f, 234.0f)
}));
vg[1].setStroke(new BasicStroke(
20.0f, 0,
2, 10.0f,
null, 0.0f
));
vg[1].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(166.0f, 566.0f),
new JAVAGeneralPath.LineTo(34.0f, 566.0f),
new JAVAGeneralPath.LineTo(34.0f, 533.0f),
new JAVAGeneralPath.LineTo(166.0f, 533.0f),
new JAVAGeneralPath.LineTo(166.0f, 467.0f),
new JAVAGeneralPath.LineTo(34.0f, 467.0f),
new JAVAGeneralPath.LineTo(34.0f, 434.0f),
new JAVAGeneralPath.LineTo(166.0f, 434.0f)
}));
vg[1].setStroke(new BasicStroke(
20.0f, 1,
0, 10.0f,
null, 0.0f
));
vg[1].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(366.0f, 566.0f),
new JAVAGeneralPath.LineTo(234.0f, 566.0f),
new JAVAGeneralPath.LineTo(234.0f, 533.0f),
new JAVAGeneralPath.LineTo(366.0f, 533.0f),
new JAVAGeneralPath.LineTo(366.0f, 467.0f),
new JAVAGeneralPath.LineTo(234.0f, 467.0f),
new JAVAGeneralPath.LineTo(234.0f, 434.0f),
new JAVAGeneralPath.LineTo(366.0f, 434.0f)
}));
vg[1].setStroke(new BasicStroke(
20.0f, 2,
1, 10.0f,
null, 0.0f
));
vg[1].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(566.0f, 566.0f),
new JAVAGeneralPath.LineTo(434.0f, 566.0f),
new JAVAGeneralPath.LineTo(434.0f, 533.0f),
new JAVAGeneralPath.LineTo(566.0f, 533.0f),
new JAVAGeneralPath.LineTo(566.0f, 467.0f),
new JAVAGeneralPath.LineTo(434.0f, 467.0f),
new JAVAGeneralPath.LineTo(434.0f, 434.0f),
new JAVAGeneralPath.LineTo(566.0f, 434.0f)
}));
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[2];
public static void main(String[] args) throws Exception {
new TestLineStyles(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestTransparency.java 0000644 0001750 0001750 00000006176 10407470034 026300 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestTransparency extends TestingPanel {
public TestTransparency(String[] args) throws Exception {
super(args);
setName("TestTransparency");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setBackground(new Color(255, 200, 0, 255));
vg[1].clearRect(0, 0, 600, 600);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 10, 10, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 155, 10, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 300, 10, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 445, 10, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 10, 155, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 155, 155, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 300, 155, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 445, 155, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 10, 300, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 155, 300, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 300, 300, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 445, 300, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 10, 445, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 155, 445, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 300, 445, 145, 145, null);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), 445, 445, 145, 145, null);
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[2];
public static void main(String[] args) throws Exception {
new TestTransparency(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestPaint.java 0000644 0001750 0001750 00000007765 10407470034 024707 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.TexturePaint;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestPaint extends TestingPanel {
public TestPaint(String[] args) throws Exception {
super(args);
setName("TestPaint");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].drawRect(0.0, 200.0, 180.0, 180.0);
vg[1].setPaint(new TexturePaint(
(BufferedImage)
new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB), new Rectangle2D.Double(0.0, 0.0, 32.0, 32.0)));
vg[1].fillRect(0.0, 200.0, 180.0, 180.0);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].drawRect(200.0, 200.0, 180.0, 180.0);
vg[1].setPaint(new TexturePaint(
(BufferedImage)
new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB), new Rectangle2D.Double(0.0, 0.0, 16.0, 16.0)));
vg[1].fillRect(200.0, 200.0, 180.0, 180.0);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[1].drawRect(400.0, 200.0, 180.0, 180.0);
vg[1].setPaint(new TexturePaint(
(BufferedImage)
new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB), new Rectangle2D.Double(16.0, 16.0, 32.0, 32.0)));
vg[1].fillRect(400.0, 200.0, 180.0, 180.0);
vg[1].setPaint(new GradientPaint(
new Point2D.Double(0.0, 400.0), new Color(255, 0, 0, 255),
new Point2D.Double(180.0, 580.0), new Color(0, 0, 255, 255), false
));
vg[1].fillRect(0.0, 400.0, 180.0, 180.0);
vg[1].setPaint(new GradientPaint(
new Point2D.Double(250.0, 450.0), new Color(0, 255, 0, 255),
new Point2D.Double(320.0, 520.0), new Color(255, 0, 255, 255), false
));
vg[1].fillRect(200.0, 400.0, 180.0, 180.0);
vg[1].setPaint(new GradientPaint(
new Point2D.Double(400.0, 400.0), new Color(255, 0, 0, 255),
new Point2D.Double(440.0, 440.0), new Color(255, 255, 0, 255), true
));
vg[1].fillRect(400.0, 400.0, 180.0, 180.0);
vg[2] = (VectorGraphics)vg[1].create();
vg[2].shear(0.5, 0.5);
vg[2].setPaint(new GradientPaint(
new Point2D.Double(0.0, 0.0), new Color(255, 0, 0, 255),
new Point2D.Double(120.0, 120.0), new Color(0, 0, 255, 255), false
));
vg[2].fillRect(0.0, 0.0, 120.0, 120.0);
vg[2].setPaint(new TexturePaint(
(BufferedImage)
new BufferedImage(32, 32, BufferedImage.TYPE_INT_ARGB), new Rectangle2D.Double(0.0, 0.0, 32.0, 32.0)));
vg[2].fillRect(200.0, -100.0, 120.0, 120.0);
vg[2].dispose();
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[3];
public static void main(String[] args) throws Exception {
new TestPaint(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestClip.java 0000644 0001750 0001750 00000165303 10407470034 024514 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.java.JAVAGeneralPath;
import org.freehep.graphicsio.test.TestingPanel;
public class TestClip extends TestingPanel {
public TestClip(String[] args) throws Exception {
super(args);
setName("TestClip");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(192, 192, 192, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].setColor(new Color(0, 0, 0, 255));
vg[2] = (VectorGraphics)vg[1].create();
vg[2].drawString("NoClip", 10, 20);
vg[2].scale(8.0, 8.0);
vg[2].translate(1.25, 1.25);
vg[2].translate(10.625, 0.0);
vg[2].setColor(new Color(255, 0, 0, 255));
vg[2].setLineWidth(0.125);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].setColor(new Color(0, 0, 0, 255));
vg[2].setLineWidth(0.375);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 0.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].translate(10.625, 0.0);
vg[2].setColor(new Color(255, 0, 0, 255));
vg[2].setLineWidth(0.125);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 3.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].setColor(new Color(0, 0, 0, 255));
vg[2].setLineWidth(0.375);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].translate(10.625, 0.0);
vg[2].setColor(new Color(255, 0, 0, 255));
vg[2].setLineWidth(0.125);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].setColor(new Color(0, 0, 0, 255));
vg[2].setLineWidth(0.375);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].translate(10.625, 0.0);
vg[2].setColor(new Color(255, 0, 0, 255));
vg[2].setLineWidth(0.125);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].setColor(new Color(0, 0, 0, 255));
vg[2].setLineWidth(0.375);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 3.1045694f, 5.1045694f, 4.0f, 4.0f, 4.0f),
new JAVAGeneralPath.CurveTo(2.8954306f, 4.0f, 2.0f, 3.1045694f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 0.8954305f, 2.8954306f, 0.0f, 4.0f, 0.0f),
new JAVAGeneralPath.CurveTo(5.1045694f, 0.0f, 6.0f, 0.8954305f, 6.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].translate(10.625, 0.0);
vg[2].setColor(new Color(255, 0, 0, 255));
vg[2].setLineWidth(0.125);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].setColor(new Color(0, 0, 0, 255));
vg[2].setLineWidth(0.375);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 2.0f),
new JAVAGeneralPath.LineTo(4.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].translate(10.625, 0.0);
vg[2].setColor(new Color(255, 0, 0, 255));
vg[2].setLineWidth(0.125);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(7.0f, 2.0f),
new JAVAGeneralPath.CurveTo(7.0f, 2.5522847f, 5.656854f, 3.0f, 4.0f, 3.0f),
new JAVAGeneralPath.CurveTo(2.3431458f, 3.0f, 1.0f, 2.5522847f, 1.0f, 2.0f),
new JAVAGeneralPath.CurveTo(1.0f, 1.4477153f, 2.3431458f, 1.0f, 4.0f, 1.0f),
new JAVAGeneralPath.CurveTo(5.656854f, 1.0f, 7.0f, 1.4477153f, 7.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].setColor(new Color(0, 0, 0, 255));
vg[2].setLineWidth(0.375);
vg[2].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 3.1045694f, 5.1045694f, 4.0f, 4.0f, 4.0f),
new JAVAGeneralPath.CurveTo(2.8954306f, 4.0f, 2.0f, 3.1045694f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 0.8954305f, 2.8954306f, 0.0f, 4.0f, 0.0f),
new JAVAGeneralPath.CurveTo(5.1045694f, 0.0f, 6.0f, 0.8954305f, 6.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[2].dispose();
vg[3] = (VectorGraphics)vg[1].create();
vg[3].drawString("JavaClip", 10, 120);
vg[3].scale(8.0, 8.0);
vg[3].translate(1.25, 13.75);
vg[3].translate(10.625, 0.0);
vg[4] = (VectorGraphics)vg[3].create();
vg[4].setColor(new Color(255, 0, 0, 255));
vg[4].setLineWidth(0.125);
vg[4].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[4].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[4].setColor(new Color(0, 0, 0, 255));
vg[4].setLineWidth(0.375);
vg[4].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 0.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
Paint0s1.paint(vg);
} // paint
} // class Paint0s0
private static class Paint0s1 {
public static void paint(VectorGraphics[] vg) {
vg[4].dispose();
vg[3].translate(10.625, 0.0);
vg[5] = (VectorGraphics)vg[3].create();
vg[5].setColor(new Color(255, 0, 0, 255));
vg[5].setLineWidth(0.125);
vg[5].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 3.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[5].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 3.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[5].setColor(new Color(0, 0, 0, 255));
vg[5].setLineWidth(0.375);
vg[5].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[5].dispose();
vg[3].translate(10.625, 0.0);
vg[6] = (VectorGraphics)vg[3].create();
vg[6].setColor(new Color(255, 0, 0, 255));
vg[6].setLineWidth(0.125);
vg[6].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[6].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[6].setColor(new Color(0, 0, 0, 255));
vg[6].setLineWidth(0.375);
vg[6].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[6].dispose();
vg[3].translate(10.625, 0.0);
vg[7] = (VectorGraphics)vg[3].create();
vg[7].setColor(new Color(255, 0, 0, 255));
vg[7].setLineWidth(0.125);
vg[7].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[7].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[7].setColor(new Color(0, 0, 0, 255));
vg[7].setLineWidth(0.375);
vg[7].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 3.1045694f, 5.1045694f, 4.0f, 4.0f, 4.0f),
new JAVAGeneralPath.CurveTo(2.8954306f, 4.0f, 2.0f, 3.1045694f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 0.8954305f, 2.8954306f, 0.0f, 4.0f, 0.0f),
new JAVAGeneralPath.CurveTo(5.1045694f, 0.0f, 6.0f, 0.8954305f, 6.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[7].dispose();
vg[3].translate(10.625, 0.0);
vg[8] = (VectorGraphics)vg[3].create();
vg[8].setColor(new Color(255, 0, 0, 255));
vg[8].setLineWidth(0.125);
vg[8].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[8].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[8].setColor(new Color(0, 0, 0, 255));
vg[8].setLineWidth(0.375);
vg[8].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 2.0f),
new JAVAGeneralPath.LineTo(4.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[8].dispose();
vg[3].translate(10.625, 0.0);
vg[9] = (VectorGraphics)vg[3].create();
vg[9].setColor(new Color(255, 0, 0, 255));
vg[9].setLineWidth(0.125);
vg[9].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(7.0f, 2.0f),
new JAVAGeneralPath.CurveTo(7.0f, 2.5522847f, 5.656854f, 3.0f, 4.0f, 3.0f),
new JAVAGeneralPath.CurveTo(2.3431458f, 3.0f, 1.0f, 2.5522847f, 1.0f, 2.0f),
new JAVAGeneralPath.CurveTo(1.0f, 1.4477153f, 2.3431458f, 1.0f, 4.0f, 1.0f),
new JAVAGeneralPath.CurveTo(5.656854f, 1.0f, 7.0f, 1.4477153f, 7.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[9].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(7.0f, 2.0f),
new JAVAGeneralPath.CurveTo(7.0f, 2.5522847f, 5.656854f, 3.0f, 4.0f, 3.0f),
new JAVAGeneralPath.CurveTo(2.3431458f, 3.0f, 1.0f, 2.5522847f, 1.0f, 2.0f),
new JAVAGeneralPath.CurveTo(1.0f, 1.4477153f, 2.3431458f, 1.0f, 4.0f, 1.0f),
new JAVAGeneralPath.CurveTo(5.656854f, 1.0f, 7.0f, 1.4477153f, 7.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[9].setColor(new Color(0, 0, 0, 255));
vg[9].setLineWidth(0.375);
vg[9].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 3.1045694f, 5.1045694f, 4.0f, 4.0f, 4.0f),
new JAVAGeneralPath.CurveTo(2.8954306f, 4.0f, 2.0f, 3.1045694f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 0.8954305f, 2.8954306f, 0.0f, 4.0f, 0.0f),
new JAVAGeneralPath.CurveTo(5.1045694f, 0.0f, 6.0f, 0.8954305f, 6.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[9].dispose();
vg[3].dispose();
vg[10] = (VectorGraphics)vg[1].create();
vg[10].drawString("OurClip", 10, 220);
vg[10].scale(8.0, 8.0);
vg[10].translate(1.25, 26.25);
vg[10].translate(10.625, 0.0);
vg[11] = (VectorGraphics)vg[10].create();
vg[11].setColor(new Color(255, 0, 0, 255));
vg[11].setLineWidth(0.125);
vg[11].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[11].setColor(new Color(0, 0, 0, 255));
vg[11].setLineWidth(0.375);
vg[11].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(5.5f, 1.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
Paint0s2.paint(vg);
} // paint
} // class Paint0s1
private static class Paint0s2 {
public static void paint(VectorGraphics[] vg) {
vg[11].dispose();
vg[10].translate(10.625, 0.0);
vg[12] = (VectorGraphics)vg[10].create();
vg[12].setColor(new Color(255, 0, 0, 255));
vg[12].setLineWidth(0.125);
vg[12].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 3.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[12].setColor(new Color(0, 0, 0, 255));
vg[12].setLineWidth(0.375);
vg[12].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.5f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.5f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[12].dispose();
vg[10].translate(10.625, 0.0);
vg[13] = (VectorGraphics)vg[10].create();
vg[13].setColor(new Color(255, 0, 0, 255));
vg[13].setLineWidth(0.125);
vg[13].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[13].setColor(new Color(0, 0, 0, 255));
vg[13].setLineWidth(0.375);
vg[13].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[13].dispose();
vg[10].translate(10.625, 0.0);
vg[14] = (VectorGraphics)vg[10].create();
vg[14].setColor(new Color(255, 0, 0, 255));
vg[14].setLineWidth(0.125);
vg[14].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[14].setColor(new Color(0, 0, 0, 255));
vg[14].setLineWidth(0.375);
vg[14].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(2.2675643f, 1.0f),
new JAVAGeneralPath.CurveTo(2.0973942f, 1.2941734f, 2.0f, 1.6357129f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 2.3642871f, 2.0973942f, 2.7058265f, 2.2675643f, 3.0f),
new JAVAGeneralPath.LineTo(5.7324357f, 3.0f),
new JAVAGeneralPath.CurveTo(5.9026055f, 2.7058265f, 6.0f, 2.3642871f, 6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 1.6357129f, 5.9026055f, 1.2941734f, 5.7324357f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[14].dispose();
vg[10].translate(10.625, 0.0);
vg[15] = (VectorGraphics)vg[10].create();
vg[15].setColor(new Color(255, 0, 0, 255));
vg[15].setLineWidth(0.125);
vg[15].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[15].setColor(new Color(0, 0, 0, 255));
vg[15].setLineWidth(0.375);
vg[15].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 2.0f),
new JAVAGeneralPath.LineTo(4.0f, 1.0f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(4.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[15].dispose();
vg[10].translate(10.625, 0.0);
vg[16] = (VectorGraphics)vg[10].create();
vg[16].setColor(new Color(255, 0, 0, 255));
vg[16].setLineWidth(0.125);
vg[16].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(7.0f, 2.0f),
new JAVAGeneralPath.CurveTo(7.0f, 2.5522847f, 5.656854f, 3.0f, 4.0f, 3.0f),
new JAVAGeneralPath.CurveTo(2.3431458f, 3.0f, 1.0f, 2.5522847f, 1.0f, 2.0f),
new JAVAGeneralPath.CurveTo(1.0f, 1.4477153f, 2.3431458f, 1.0f, 4.0f, 1.0f),
new JAVAGeneralPath.CurveTo(5.656854f, 1.0f, 7.0f, 1.4477153f, 7.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[16].setColor(new Color(0, 0, 0, 255));
vg[16].setLineWidth(0.375);
vg[16].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(4.0f, 1.0f),
new JAVAGeneralPath.CurveTo(3.3075979f, 1.0f, 2.6699824f, 1.0781897f, 2.162285f, 1.2095255f),
new JAVAGeneralPath.LineTo(2.162285f, 1.2095255f),
new JAVAGeneralPath.CurveTo(2.0578518f, 1.4519914f, 2.0f, 1.7192397f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 2.2807603f, 2.0578518f, 2.5480087f, 2.1622853f, 2.7904747f),
new JAVAGeneralPath.LineTo(2.1622853f, 2.7904747f),
new JAVAGeneralPath.CurveTo(2.6699827f, 2.9218102f, 3.307598f, 3.0f, 4.0f, 3.0f),
new JAVAGeneralPath.CurveTo(4.692402f, 3.0f, 5.3300176f, 2.9218102f, 5.8377147f, 2.7904744f),
new JAVAGeneralPath.LineTo(5.8377147f, 2.7904744f),
new JAVAGeneralPath.CurveTo(5.942148f, 2.5480087f, 6.0f, 2.2807603f, 6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 1.7192397f, 5.942148f, 1.4519914f, 5.8377147f, 1.2095255f),
new JAVAGeneralPath.LineTo(5.8377147f, 1.2095255f),
new JAVAGeneralPath.CurveTo(5.3300176f, 1.0781897f, 4.692402f, 1.0f, 4.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[16].dispose();
vg[10].dispose();
vg[17] = (VectorGraphics)vg[1].create();
vg[17].drawString("NoClip", 10, 320);
vg[17].scale(8.0, 8.0);
vg[17].translate(1.25, 38.75);
vg[17].translate(10.625, 0.0);
vg[17].setColor(new Color(255, 0, 0, 255));
vg[17].setLineWidth(0.125);
vg[17].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].setColor(new Color(0, 0, 0, 255));
vg[17].setLineWidth(0.375);
vg[17].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 0.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].translate(10.625, 0.0);
vg[17].setColor(new Color(255, 0, 0, 255));
vg[17].setLineWidth(0.125);
vg[17].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 3.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].setColor(new Color(0, 0, 0, 255));
vg[17].setLineWidth(0.375);
vg[17].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].translate(10.625, 0.0);
Paint0s3.paint(vg);
} // paint
} // class Paint0s2
private static class Paint0s3 {
public static void paint(VectorGraphics[] vg) {
vg[17].setColor(new Color(255, 0, 0, 255));
vg[17].setLineWidth(0.125);
vg[17].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].setColor(new Color(0, 0, 0, 255));
vg[17].setLineWidth(0.375);
vg[17].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].translate(10.625, 0.0);
vg[17].setColor(new Color(255, 0, 0, 255));
vg[17].setLineWidth(0.125);
vg[17].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].setColor(new Color(0, 0, 0, 255));
vg[17].setLineWidth(0.375);
vg[17].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 3.1045694f, 5.1045694f, 4.0f, 4.0f, 4.0f),
new JAVAGeneralPath.CurveTo(2.8954306f, 4.0f, 2.0f, 3.1045694f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 0.8954305f, 2.8954306f, 0.0f, 4.0f, 0.0f),
new JAVAGeneralPath.CurveTo(5.1045694f, 0.0f, 6.0f, 0.8954305f, 6.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].translate(10.625, 0.0);
vg[17].setColor(new Color(255, 0, 0, 255));
vg[17].setLineWidth(0.125);
vg[17].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].setColor(new Color(0, 0, 0, 255));
vg[17].setLineWidth(0.375);
vg[17].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 2.0f),
new JAVAGeneralPath.LineTo(4.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].translate(10.625, 0.0);
vg[17].setColor(new Color(255, 0, 0, 255));
vg[17].setLineWidth(0.125);
vg[17].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(7.0f, 2.0f),
new JAVAGeneralPath.CurveTo(7.0f, 2.5522847f, 5.656854f, 3.0f, 4.0f, 3.0f),
new JAVAGeneralPath.CurveTo(2.3431458f, 3.0f, 1.0f, 2.5522847f, 1.0f, 2.0f),
new JAVAGeneralPath.CurveTo(1.0f, 1.4477153f, 2.3431458f, 1.0f, 4.0f, 1.0f),
new JAVAGeneralPath.CurveTo(5.656854f, 1.0f, 7.0f, 1.4477153f, 7.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].setColor(new Color(0, 0, 0, 255));
vg[17].setLineWidth(0.375);
vg[17].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 3.1045694f, 5.1045694f, 4.0f, 4.0f, 4.0f),
new JAVAGeneralPath.CurveTo(2.8954306f, 4.0f, 2.0f, 3.1045694f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 0.8954305f, 2.8954306f, 0.0f, 4.0f, 0.0f),
new JAVAGeneralPath.CurveTo(5.1045694f, 0.0f, 6.0f, 0.8954305f, 6.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[17].dispose();
vg[18] = (VectorGraphics)vg[1].create();
vg[18].drawString("JavaClip", 10, 420);
vg[18].scale(8.0, 8.0);
vg[18].translate(1.25, 51.25);
vg[18].translate(10.625, 0.0);
vg[19] = (VectorGraphics)vg[18].create();
vg[19].setColor(new Color(255, 0, 0, 255));
vg[19].setLineWidth(0.125);
vg[19].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[19].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[19].setColor(new Color(0, 0, 0, 255));
vg[19].setLineWidth(0.375);
vg[19].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 0.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[19].dispose();
vg[18].translate(10.625, 0.0);
vg[20] = (VectorGraphics)vg[18].create();
vg[20].setColor(new Color(255, 0, 0, 255));
vg[20].setLineWidth(0.125);
vg[20].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 3.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[20].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 3.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[20].setColor(new Color(0, 0, 0, 255));
vg[20].setLineWidth(0.375);
vg[20].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 0.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[20].dispose();
vg[18].translate(10.625, 0.0);
vg[21] = (VectorGraphics)vg[18].create();
vg[21].setColor(new Color(255, 0, 0, 255));
vg[21].setLineWidth(0.125);
vg[21].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[21].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[21].setColor(new Color(0, 0, 0, 255));
vg[21].setLineWidth(0.375);
vg[21].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
Paint0s4.paint(vg);
} // paint
} // class Paint0s3
private static class Paint0s4 {
public static void paint(VectorGraphics[] vg) {
vg[21].dispose();
vg[18].translate(10.625, 0.0);
vg[22] = (VectorGraphics)vg[18].create();
vg[22].setColor(new Color(255, 0, 0, 255));
vg[22].setLineWidth(0.125);
vg[22].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[22].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[22].setColor(new Color(0, 0, 0, 255));
vg[22].setLineWidth(0.375);
vg[22].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 3.1045694f, 5.1045694f, 4.0f, 4.0f, 4.0f),
new JAVAGeneralPath.CurveTo(2.8954306f, 4.0f, 2.0f, 3.1045694f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 0.8954305f, 2.8954306f, 0.0f, 4.0f, 0.0f),
new JAVAGeneralPath.CurveTo(5.1045694f, 0.0f, 6.0f, 0.8954305f, 6.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[22].dispose();
vg[18].translate(10.625, 0.0);
vg[23] = (VectorGraphics)vg[18].create();
vg[23].setColor(new Color(255, 0, 0, 255));
vg[23].setLineWidth(0.125);
vg[23].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[23].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[23].setColor(new Color(0, 0, 0, 255));
vg[23].setLineWidth(0.375);
vg[23].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(0.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 2.0f),
new JAVAGeneralPath.LineTo(4.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 2.0f),
new JAVAGeneralPath.LineTo(8.0f, 0.0f),
new JAVAGeneralPath.LineTo(0.0f, 0.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[23].dispose();
vg[18].translate(10.625, 0.0);
vg[24] = (VectorGraphics)vg[18].create();
vg[24].setColor(new Color(255, 0, 0, 255));
vg[24].setLineWidth(0.125);
vg[24].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(7.0f, 2.0f),
new JAVAGeneralPath.CurveTo(7.0f, 2.5522847f, 5.656854f, 3.0f, 4.0f, 3.0f),
new JAVAGeneralPath.CurveTo(2.3431458f, 3.0f, 1.0f, 2.5522847f, 1.0f, 2.0f),
new JAVAGeneralPath.CurveTo(1.0f, 1.4477153f, 2.3431458f, 1.0f, 4.0f, 1.0f),
new JAVAGeneralPath.CurveTo(5.656854f, 1.0f, 7.0f, 1.4477153f, 7.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[24].clip(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(7.0f, 2.0f),
new JAVAGeneralPath.CurveTo(7.0f, 2.5522847f, 5.656854f, 3.0f, 4.0f, 3.0f),
new JAVAGeneralPath.CurveTo(2.3431458f, 3.0f, 1.0f, 2.5522847f, 1.0f, 2.0f),
new JAVAGeneralPath.CurveTo(1.0f, 1.4477153f, 2.3431458f, 1.0f, 4.0f, 1.0f),
new JAVAGeneralPath.CurveTo(5.656854f, 1.0f, 7.0f, 1.4477153f, 7.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[24].setColor(new Color(0, 0, 0, 255));
vg[24].setLineWidth(0.375);
vg[24].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 3.1045694f, 5.1045694f, 4.0f, 4.0f, 4.0f),
new JAVAGeneralPath.CurveTo(2.8954306f, 4.0f, 2.0f, 3.1045694f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 0.8954305f, 2.8954306f, 0.0f, 4.0f, 0.0f),
new JAVAGeneralPath.CurveTo(5.1045694f, 0.0f, 6.0f, 0.8954305f, 6.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[24].dispose();
vg[18].dispose();
vg[25] = (VectorGraphics)vg[1].create();
vg[25].drawString("AreaClip", 10, 520);
vg[25].scale(8.0, 8.0);
vg[25].translate(1.25, 63.75);
vg[25].translate(10.625, 0.0);
vg[26] = (VectorGraphics)vg[25].create();
vg[26].setColor(new Color(255, 0, 0, 255));
vg[26].setLineWidth(0.125);
vg[26].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[26].setColor(new Color(0, 0, 0, 255));
vg[26].setLineWidth(0.375);
vg[26].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(5.5f, 1.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[26].dispose();
vg[25].translate(10.625, 0.0);
vg[27] = (VectorGraphics)vg[25].create();
vg[27].setColor(new Color(255, 0, 0, 255));
vg[27].setLineWidth(0.125);
vg[27].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.0f, 3.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[27].setColor(new Color(0, 0, 0, 255));
vg[27].setLineWidth(0.375);
vg[27].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.5f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(4.5f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[27].dispose();
vg[25].translate(10.625, 0.0);
vg[28] = (VectorGraphics)vg[25].create();
vg[28].setColor(new Color(255, 0, 0, 255));
vg[28].setLineWidth(0.125);
vg[28].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[28].setColor(new Color(0, 0, 0, 255));
vg[28].setLineWidth(0.375);
vg[28].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 2.0f),
new JAVAGeneralPath.LineTo(2.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 1.0f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(5.0f, 1.0f),
new JAVAGeneralPath.LineTo(6.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[28].dispose();
vg[25].translate(10.625, 0.0);
vg[29] = (VectorGraphics)vg[25].create();
vg[29].setColor(new Color(255, 0, 0, 255));
vg[29].setLineWidth(0.125);
vg[29].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
Paint0s5.paint(vg);
} // paint
} // class Paint0s4
private static class Paint0s5 {
public static void paint(VectorGraphics[] vg) {
vg[29].setColor(new Color(0, 0, 0, 255));
vg[29].setLineWidth(0.375);
vg[29].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(2.2675643f, 1.0f),
new JAVAGeneralPath.CurveTo(2.0973942f, 1.2941734f, 2.0f, 1.6357129f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 2.3642871f, 2.0973942f, 2.7058265f, 2.2675643f, 3.0f),
new JAVAGeneralPath.LineTo(5.7324357f, 3.0f),
new JAVAGeneralPath.CurveTo(5.9026055f, 2.7058265f, 6.0f, 2.3642871f, 6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 1.6357129f, 5.9026055f, 1.2941734f, 5.7324357f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[29].dispose();
vg[25].translate(10.625, 0.0);
vg[30] = (VectorGraphics)vg[25].create();
vg[30].setColor(new Color(255, 0, 0, 255));
vg[30].setLineWidth(0.125);
vg[30].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.LineTo(7.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 3.0f),
new JAVAGeneralPath.LineTo(1.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[30].setColor(new Color(0, 0, 0, 255));
vg[30].setLineWidth(0.375);
vg[30].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(1.0f, 1.0f),
new JAVAGeneralPath.LineTo(1.0f, 2.0f),
new JAVAGeneralPath.LineTo(3.0f, 2.0f),
new JAVAGeneralPath.LineTo(4.0f, 1.0f),
new JAVAGeneralPath.ClosePath(),
new JAVAGeneralPath.MoveTo(4.0f, 1.0f),
new JAVAGeneralPath.LineTo(5.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 2.0f),
new JAVAGeneralPath.LineTo(7.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[30].dispose();
vg[25].translate(10.625, 0.0);
vg[31] = (VectorGraphics)vg[25].create();
vg[31].setColor(new Color(255, 0, 0, 255));
vg[31].setLineWidth(0.125);
vg[31].draw(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(7.0f, 2.0f),
new JAVAGeneralPath.CurveTo(7.0f, 2.5522847f, 5.656854f, 3.0f, 4.0f, 3.0f),
new JAVAGeneralPath.CurveTo(2.3431458f, 3.0f, 1.0f, 2.5522847f, 1.0f, 2.0f),
new JAVAGeneralPath.CurveTo(1.0f, 1.4477153f, 2.3431458f, 1.0f, 4.0f, 1.0f),
new JAVAGeneralPath.CurveTo(5.656854f, 1.0f, 7.0f, 1.4477153f, 7.0f, 2.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[31].setColor(new Color(0, 0, 0, 255));
vg[31].setLineWidth(0.375);
vg[31].fill(new JAVAGeneralPath(1, new JAVAGeneralPath.PathElement[] {
new JAVAGeneralPath.MoveTo(4.0f, 1.0f),
new JAVAGeneralPath.CurveTo(3.3075979f, 1.0f, 2.6699824f, 1.0781897f, 2.162285f, 1.2095255f),
new JAVAGeneralPath.LineTo(2.162285f, 1.2095255f),
new JAVAGeneralPath.CurveTo(2.0578518f, 1.4519914f, 2.0f, 1.7192397f, 2.0f, 2.0f),
new JAVAGeneralPath.CurveTo(2.0f, 2.2807603f, 2.0578518f, 2.5480087f, 2.1622853f, 2.7904747f),
new JAVAGeneralPath.LineTo(2.1622853f, 2.7904747f),
new JAVAGeneralPath.CurveTo(2.6699827f, 2.9218102f, 3.307598f, 3.0f, 4.0f, 3.0f),
new JAVAGeneralPath.CurveTo(4.692402f, 3.0f, 5.3300176f, 2.9218102f, 5.8377147f, 2.7904744f),
new JAVAGeneralPath.LineTo(5.8377147f, 2.7904744f),
new JAVAGeneralPath.CurveTo(5.942148f, 2.5480087f, 6.0f, 2.2807603f, 6.0f, 2.0f),
new JAVAGeneralPath.CurveTo(6.0f, 1.7192397f, 5.942148f, 1.4519914f, 5.8377147f, 1.2095255f),
new JAVAGeneralPath.LineTo(5.8377147f, 1.2095255f),
new JAVAGeneralPath.CurveTo(5.3300176f, 1.0781897f, 4.692402f, 1.0f, 4.0f, 1.0f),
new JAVAGeneralPath.ClosePath()
}));
vg[31].dispose();
vg[25].dispose();
vg[1].dispose();
} // paint
} // class Paint0s5
private VectorGraphics vg[] = new VectorGraphics[32];
public static void main(String[] args) throws Exception {
new TestClip(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestPrintColors.java 0000644 0001750 0001750 00000153475 10407470034 026112 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestPrintColors extends TestingPanel {
public TestPrintColors(String[] args) throws Exception {
super(args);
setName("TestPrintColors");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[2] = (VectorGraphics)vg[1].create();
vg[3] = (VectorGraphics)vg[2].create(0, 0, 600, 600);
vg[3].setColor(new Color(51, 51, 51, 255));
vg[3].setFont(new Font("Dialog", 0, 12));
vg[3].setColor(new Color(51, 51, 51, 255));
vg[3].setFont(new Font("Dialog", 0, 12));
vg[4] = (VectorGraphics)vg[3].create();
vg[5] = (VectorGraphics)vg[4].create();
vg[5].setColor(new Color(238, 238, 238, 255));
vg[5].fillRect(0, 0, 600, 600);
vg[5].dispose();
vg[6] = (VectorGraphics)vg[4].create();
vg[7] = (VectorGraphics)vg[6].create(400, 546, 200, 42);
vg[7].setColor(new Color(51, 51, 51, 255));
vg[7].setFont(new Font("Dialog", 0, 12));
vg[7].setColor(new Color(51, 51, 51, 255));
vg[7].setFont(new Font("Dialog", 0, 12));
vg[8] = (VectorGraphics)vg[7].create();
vg[8].setColorMode(2);
vg[8].setColor(new Color(0, 0, 0, 255));
vg[8].fillRect(3, 3, 194, 36);
vg[8].translate(0, 0);
vg[8].setColor(new Color(255, 255, 255, 255));
vg[8].fillRect(0, 0, 199, 1);
vg[8].fillRect(0, 1, 1, 41);
vg[8].fillRect(1, 41, 199, 1);
vg[8].fillRect(199, 0, 1, 41);
vg[8].translate(0, 0);
vg[8].setColor(new Color(0, 0, 0, 255));
vg[8].translate(1, 1);
vg[8].setColor(new Color(0, 0, 0, 255));
vg[8].fillRect(0, 0, 196, 2);
vg[8].fillRect(0, 2, 2, 38);
vg[8].fillRect(2, 38, 196, 2);
vg[8].fillRect(196, 0, 2, 38);
vg[8].translate(-1, -1);
vg[8].setColor(new Color(0, 0, 0, 255));
vg[8].dispose();
vg[7].dispose();
vg[9] = (VectorGraphics)vg[6].create(200, 546, 200, 42);
vg[9].setColor(new Color(51, 51, 51, 255));
vg[9].setFont(new Font("Dialog", 0, 12));
vg[9].setColor(new Color(51, 51, 51, 255));
vg[9].setFont(new Font("Dialog", 0, 12));
vg[10] = (VectorGraphics)vg[9].create();
vg[10].setColorMode(1);
vg[10].setColor(new Color(0, 0, 0, 255));
vg[10].fillRect(3, 3, 194, 36);
vg[10].translate(0, 0);
vg[10].setColor(new Color(255, 255, 255, 255));
vg[10].fillRect(0, 0, 199, 1);
vg[10].fillRect(0, 1, 1, 41);
vg[10].fillRect(1, 41, 199, 1);
vg[10].fillRect(199, 0, 1, 41);
vg[10].translate(0, 0);
vg[10].setColor(new Color(0, 0, 0, 255));
vg[10].translate(1, 1);
vg[10].setColor(new Color(0, 0, 0, 255));
vg[10].fillRect(0, 0, 196, 2);
vg[10].fillRect(0, 2, 2, 38);
vg[10].fillRect(2, 38, 196, 2);
vg[10].fillRect(196, 0, 2, 38);
vg[10].translate(-1, -1);
vg[10].setColor(new Color(0, 0, 0, 255));
vg[10].dispose();
vg[9].dispose();
vg[11] = (VectorGraphics)vg[6].create(0, 546, 200, 42);
vg[11].setColor(new Color(51, 51, 51, 255));
vg[11].setFont(new Font("Dialog", 0, 12));
vg[11].setColor(new Color(51, 51, 51, 255));
vg[11].setFont(new Font("Dialog", 0, 12));
vg[12] = (VectorGraphics)vg[11].create();
vg[12].setColorMode(0);
vg[12].setColor(new Color(0, 0, 0, 255));
vg[12].fillRect(3, 3, 194, 36);
vg[12].translate(0, 0);
vg[12].setColor(new Color(255, 255, 255, 255));
vg[12].fillRect(0, 0, 199, 1);
vg[12].fillRect(0, 1, 1, 41);
vg[12].fillRect(1, 41, 199, 1);
vg[12].fillRect(199, 0, 1, 41);
vg[12].translate(0, 0);
vg[12].setColor(new Color(0, 0, 0, 255));
vg[12].translate(1, 1);
vg[12].setColor(new Color(0, 0, 0, 255));
vg[12].fillRect(0, 0, 196, 2);
vg[12].fillRect(0, 2, 2, 38);
vg[12].fillRect(2, 38, 196, 2);
vg[12].fillRect(196, 0, 2, 38);
vg[12].translate(-1, -1);
vg[12].setColor(new Color(0, 0, 0, 255));
vg[12].dispose();
vg[11].dispose();
vg[13] = (VectorGraphics)vg[6].create(400, 504, 200, 42);
vg[13].setColor(new Color(51, 51, 51, 255));
vg[13].setFont(new Font("Dialog", 0, 12));
vg[13].setColor(new Color(51, 51, 51, 255));
vg[13].setFont(new Font("Dialog", 0, 12));
vg[14] = (VectorGraphics)vg[13].create();
vg[14].setColorMode(2);
vg[14].setColor(new Color(64, 64, 64, 255));
vg[14].fillRect(3, 3, 194, 36);
vg[14].translate(0, 0);
vg[14].setColor(new Color(255, 255, 255, 255));
vg[14].fillRect(0, 0, 199, 1);
vg[14].fillRect(0, 1, 1, 41);
vg[14].fillRect(1, 41, 199, 1);
vg[14].fillRect(199, 0, 1, 41);
vg[14].translate(0, 0);
vg[14].setColor(new Color(64, 64, 64, 255));
vg[14].translate(1, 1);
vg[14].setColor(new Color(0, 0, 0, 255));
vg[14].fillRect(0, 0, 196, 2);
vg[14].fillRect(0, 2, 2, 38);
vg[14].fillRect(2, 38, 196, 2);
vg[14].fillRect(196, 0, 2, 38);
vg[14].translate(-1, -1);
vg[14].setColor(new Color(64, 64, 64, 255));
vg[14].dispose();
vg[13].dispose();
vg[15] = (VectorGraphics)vg[6].create(200, 504, 200, 42);
vg[15].setColor(new Color(51, 51, 51, 255));
vg[15].setFont(new Font("Dialog", 0, 12));
vg[15].setColor(new Color(51, 51, 51, 255));
vg[15].setFont(new Font("Dialog", 0, 12));
vg[16] = (VectorGraphics)vg[15].create();
vg[16].setColorMode(1);
vg[16].setColor(new Color(64, 64, 64, 255));
vg[16].fillRect(3, 3, 194, 36);
vg[16].translate(0, 0);
vg[16].setColor(new Color(255, 255, 255, 255));
vg[16].fillRect(0, 0, 199, 1);
vg[16].fillRect(0, 1, 1, 41);
vg[16].fillRect(1, 41, 199, 1);
vg[16].fillRect(199, 0, 1, 41);
vg[16].translate(0, 0);
vg[16].setColor(new Color(64, 64, 64, 255));
vg[16].translate(1, 1);
vg[16].setColor(new Color(0, 0, 0, 255));
vg[16].fillRect(0, 0, 196, 2);
vg[16].fillRect(0, 2, 2, 38);
vg[16].fillRect(2, 38, 196, 2);
vg[16].fillRect(196, 0, 2, 38);
vg[16].translate(-1, -1);
vg[16].setColor(new Color(64, 64, 64, 255));
vg[16].dispose();
vg[15].dispose();
vg[17] = (VectorGraphics)vg[6].create(0, 504, 200, 42);
vg[17].setColor(new Color(51, 51, 51, 255));
vg[17].setFont(new Font("Dialog", 0, 12));
vg[17].setColor(new Color(51, 51, 51, 255));
vg[17].setFont(new Font("Dialog", 0, 12));
vg[18] = (VectorGraphics)vg[17].create();
vg[18].setColorMode(0);
vg[18].setColor(new Color(64, 64, 64, 255));
vg[18].fillRect(3, 3, 194, 36);
vg[18].translate(0, 0);
vg[18].setColor(new Color(255, 255, 255, 255));
vg[18].fillRect(0, 0, 199, 1);
vg[18].fillRect(0, 1, 1, 41);
vg[18].fillRect(1, 41, 199, 1);
vg[18].fillRect(199, 0, 1, 41);
vg[18].translate(0, 0);
vg[18].setColor(new Color(64, 64, 64, 255));
vg[18].translate(1, 1);
vg[18].setColor(new Color(0, 0, 0, 255));
vg[18].fillRect(0, 0, 196, 2);
vg[18].fillRect(0, 2, 2, 38);
vg[18].fillRect(2, 38, 196, 2);
vg[18].fillRect(196, 0, 2, 38);
vg[18].translate(-1, -1);
vg[18].setColor(new Color(64, 64, 64, 255));
vg[18].dispose();
vg[17].dispose();
vg[19] = (VectorGraphics)vg[6].create(400, 462, 200, 42);
vg[19].setColor(new Color(51, 51, 51, 255));
vg[19].setFont(new Font("Dialog", 0, 12));
vg[19].setColor(new Color(51, 51, 51, 255));
vg[19].setFont(new Font("Dialog", 0, 12));
vg[20] = (VectorGraphics)vg[19].create();
Paint0s1.paint(vg);
} // paint
} // class Paint0s0
private static class Paint0s1 {
public static void paint(VectorGraphics[] vg) {
vg[20].setColorMode(2);
vg[20].setColor(new Color(128, 128, 128, 255));
vg[20].fillRect(3, 3, 194, 36);
vg[20].translate(0, 0);
vg[20].setColor(new Color(255, 255, 255, 255));
vg[20].fillRect(0, 0, 199, 1);
vg[20].fillRect(0, 1, 1, 41);
vg[20].fillRect(1, 41, 199, 1);
vg[20].fillRect(199, 0, 1, 41);
vg[20].translate(0, 0);
vg[20].setColor(new Color(128, 128, 128, 255));
vg[20].translate(1, 1);
vg[20].setColor(new Color(0, 0, 0, 255));
vg[20].fillRect(0, 0, 196, 2);
vg[20].fillRect(0, 2, 2, 38);
vg[20].fillRect(2, 38, 196, 2);
vg[20].fillRect(196, 0, 2, 38);
vg[20].translate(-1, -1);
vg[20].setColor(new Color(128, 128, 128, 255));
vg[20].dispose();
vg[19].dispose();
vg[21] = (VectorGraphics)vg[6].create(200, 462, 200, 42);
vg[21].setColor(new Color(51, 51, 51, 255));
vg[21].setFont(new Font("Dialog", 0, 12));
vg[21].setColor(new Color(51, 51, 51, 255));
vg[21].setFont(new Font("Dialog", 0, 12));
vg[22] = (VectorGraphics)vg[21].create();
vg[22].setColorMode(1);
vg[22].setColor(new Color(128, 128, 128, 255));
vg[22].fillRect(3, 3, 194, 36);
vg[22].translate(0, 0);
vg[22].setColor(new Color(255, 255, 255, 255));
vg[22].fillRect(0, 0, 199, 1);
vg[22].fillRect(0, 1, 1, 41);
vg[22].fillRect(1, 41, 199, 1);
vg[22].fillRect(199, 0, 1, 41);
vg[22].translate(0, 0);
vg[22].setColor(new Color(128, 128, 128, 255));
vg[22].translate(1, 1);
vg[22].setColor(new Color(0, 0, 0, 255));
vg[22].fillRect(0, 0, 196, 2);
vg[22].fillRect(0, 2, 2, 38);
vg[22].fillRect(2, 38, 196, 2);
vg[22].fillRect(196, 0, 2, 38);
vg[22].translate(-1, -1);
vg[22].setColor(new Color(128, 128, 128, 255));
vg[22].dispose();
vg[21].dispose();
vg[23] = (VectorGraphics)vg[6].create(0, 462, 200, 42);
vg[23].setColor(new Color(51, 51, 51, 255));
vg[23].setFont(new Font("Dialog", 0, 12));
vg[23].setColor(new Color(51, 51, 51, 255));
vg[23].setFont(new Font("Dialog", 0, 12));
vg[24] = (VectorGraphics)vg[23].create();
vg[24].setColorMode(0);
vg[24].setColor(new Color(128, 128, 128, 255));
vg[24].fillRect(3, 3, 194, 36);
vg[24].translate(0, 0);
vg[24].setColor(new Color(255, 255, 255, 255));
vg[24].fillRect(0, 0, 199, 1);
vg[24].fillRect(0, 1, 1, 41);
vg[24].fillRect(1, 41, 199, 1);
vg[24].fillRect(199, 0, 1, 41);
vg[24].translate(0, 0);
vg[24].setColor(new Color(128, 128, 128, 255));
vg[24].translate(1, 1);
vg[24].setColor(new Color(0, 0, 0, 255));
vg[24].fillRect(0, 0, 196, 2);
vg[24].fillRect(0, 2, 2, 38);
vg[24].fillRect(2, 38, 196, 2);
vg[24].fillRect(196, 0, 2, 38);
vg[24].translate(-1, -1);
vg[24].setColor(new Color(128, 128, 128, 255));
vg[24].dispose();
vg[23].dispose();
vg[25] = (VectorGraphics)vg[6].create(400, 420, 200, 42);
vg[25].setColor(new Color(51, 51, 51, 255));
vg[25].setFont(new Font("Dialog", 0, 12));
vg[25].setColor(new Color(51, 51, 51, 255));
vg[25].setFont(new Font("Dialog", 0, 12));
vg[26] = (VectorGraphics)vg[25].create();
vg[26].setColorMode(2);
vg[26].setColor(new Color(192, 192, 192, 255));
vg[26].fillRect(3, 3, 194, 36);
vg[26].translate(0, 0);
vg[26].setColor(new Color(255, 255, 255, 255));
vg[26].fillRect(0, 0, 199, 1);
vg[26].fillRect(0, 1, 1, 41);
vg[26].fillRect(1, 41, 199, 1);
vg[26].fillRect(199, 0, 1, 41);
vg[26].translate(0, 0);
vg[26].setColor(new Color(192, 192, 192, 255));
vg[26].translate(1, 1);
vg[26].setColor(new Color(0, 0, 0, 255));
vg[26].fillRect(0, 0, 196, 2);
vg[26].fillRect(0, 2, 2, 38);
vg[26].fillRect(2, 38, 196, 2);
vg[26].fillRect(196, 0, 2, 38);
vg[26].translate(-1, -1);
vg[26].setColor(new Color(192, 192, 192, 255));
vg[26].dispose();
vg[25].dispose();
vg[27] = (VectorGraphics)vg[6].create(200, 420, 200, 42);
vg[27].setColor(new Color(51, 51, 51, 255));
vg[27].setFont(new Font("Dialog", 0, 12));
vg[27].setColor(new Color(51, 51, 51, 255));
vg[27].setFont(new Font("Dialog", 0, 12));
vg[28] = (VectorGraphics)vg[27].create();
vg[28].setColorMode(1);
vg[28].setColor(new Color(192, 192, 192, 255));
vg[28].fillRect(3, 3, 194, 36);
vg[28].translate(0, 0);
vg[28].setColor(new Color(255, 255, 255, 255));
vg[28].fillRect(0, 0, 199, 1);
vg[28].fillRect(0, 1, 1, 41);
vg[28].fillRect(1, 41, 199, 1);
vg[28].fillRect(199, 0, 1, 41);
vg[28].translate(0, 0);
vg[28].setColor(new Color(192, 192, 192, 255));
vg[28].translate(1, 1);
vg[28].setColor(new Color(0, 0, 0, 255));
vg[28].fillRect(0, 0, 196, 2);
vg[28].fillRect(0, 2, 2, 38);
vg[28].fillRect(2, 38, 196, 2);
vg[28].fillRect(196, 0, 2, 38);
vg[28].translate(-1, -1);
vg[28].setColor(new Color(192, 192, 192, 255));
vg[28].dispose();
vg[27].dispose();
vg[29] = (VectorGraphics)vg[6].create(0, 420, 200, 42);
vg[29].setColor(new Color(51, 51, 51, 255));
vg[29].setFont(new Font("Dialog", 0, 12));
vg[29].setColor(new Color(51, 51, 51, 255));
vg[29].setFont(new Font("Dialog", 0, 12));
vg[30] = (VectorGraphics)vg[29].create();
vg[30].setColorMode(0);
vg[30].setColor(new Color(192, 192, 192, 255));
vg[30].fillRect(3, 3, 194, 36);
vg[30].translate(0, 0);
vg[30].setColor(new Color(255, 255, 255, 255));
vg[30].fillRect(0, 0, 199, 1);
vg[30].fillRect(0, 1, 1, 41);
vg[30].fillRect(1, 41, 199, 1);
vg[30].fillRect(199, 0, 1, 41);
vg[30].translate(0, 0);
vg[30].setColor(new Color(192, 192, 192, 255));
vg[30].translate(1, 1);
vg[30].setColor(new Color(0, 0, 0, 255));
vg[30].fillRect(0, 0, 196, 2);
vg[30].fillRect(0, 2, 2, 38);
vg[30].fillRect(2, 38, 196, 2);
vg[30].fillRect(196, 0, 2, 38);
vg[30].translate(-1, -1);
vg[30].setColor(new Color(192, 192, 192, 255));
vg[30].dispose();
vg[29].dispose();
vg[31] = (VectorGraphics)vg[6].create(400, 378, 200, 42);
vg[31].setColor(new Color(51, 51, 51, 255));
vg[31].setFont(new Font("Dialog", 0, 12));
vg[31].setColor(new Color(51, 51, 51, 255));
vg[31].setFont(new Font("Dialog", 0, 12));
vg[32] = (VectorGraphics)vg[31].create();
vg[32].setColorMode(2);
vg[32].setColor(new Color(255, 255, 255, 255));
vg[32].fillRect(3, 3, 194, 36);
vg[32].translate(0, 0);
vg[32].setColor(new Color(255, 255, 255, 255));
vg[32].fillRect(0, 0, 199, 1);
vg[32].fillRect(0, 1, 1, 41);
vg[32].fillRect(1, 41, 199, 1);
vg[32].fillRect(199, 0, 1, 41);
vg[32].translate(0, 0);
vg[32].setColor(new Color(255, 255, 255, 255));
vg[32].translate(1, 1);
vg[32].setColor(new Color(0, 0, 0, 255));
vg[32].fillRect(0, 0, 196, 2);
vg[32].fillRect(0, 2, 2, 38);
vg[32].fillRect(2, 38, 196, 2);
vg[32].fillRect(196, 0, 2, 38);
vg[32].translate(-1, -1);
vg[32].setColor(new Color(255, 255, 255, 255));
vg[32].dispose();
vg[31].dispose();
vg[33] = (VectorGraphics)vg[6].create(200, 378, 200, 42);
vg[33].setColor(new Color(51, 51, 51, 255));
vg[33].setFont(new Font("Dialog", 0, 12));
vg[33].setColor(new Color(51, 51, 51, 255));
vg[33].setFont(new Font("Dialog", 0, 12));
vg[34] = (VectorGraphics)vg[33].create();
vg[34].setColorMode(1);
vg[34].setColor(new Color(255, 255, 255, 255));
vg[34].fillRect(3, 3, 194, 36);
vg[34].translate(0, 0);
Paint0s2.paint(vg);
} // paint
} // class Paint0s1
private static class Paint0s2 {
public static void paint(VectorGraphics[] vg) {
vg[34].setColor(new Color(255, 255, 255, 255));
vg[34].fillRect(0, 0, 199, 1);
vg[34].fillRect(0, 1, 1, 41);
vg[34].fillRect(1, 41, 199, 1);
vg[34].fillRect(199, 0, 1, 41);
vg[34].translate(0, 0);
vg[34].setColor(new Color(255, 255, 255, 255));
vg[34].translate(1, 1);
vg[34].setColor(new Color(0, 0, 0, 255));
vg[34].fillRect(0, 0, 196, 2);
vg[34].fillRect(0, 2, 2, 38);
vg[34].fillRect(2, 38, 196, 2);
vg[34].fillRect(196, 0, 2, 38);
vg[34].translate(-1, -1);
vg[34].setColor(new Color(255, 255, 255, 255));
vg[34].dispose();
vg[33].dispose();
vg[35] = (VectorGraphics)vg[6].create(0, 378, 200, 42);
vg[35].setColor(new Color(51, 51, 51, 255));
vg[35].setFont(new Font("Dialog", 0, 12));
vg[35].setColor(new Color(51, 51, 51, 255));
vg[35].setFont(new Font("Dialog", 0, 12));
vg[36] = (VectorGraphics)vg[35].create();
vg[36].setColorMode(0);
vg[36].setColor(new Color(255, 255, 255, 255));
vg[36].fillRect(3, 3, 194, 36);
vg[36].translate(0, 0);
vg[36].setColor(new Color(255, 255, 255, 255));
vg[36].fillRect(0, 0, 199, 1);
vg[36].fillRect(0, 1, 1, 41);
vg[36].fillRect(1, 41, 199, 1);
vg[36].fillRect(199, 0, 1, 41);
vg[36].translate(0, 0);
vg[36].setColor(new Color(255, 255, 255, 255));
vg[36].translate(1, 1);
vg[36].setColor(new Color(0, 0, 0, 255));
vg[36].fillRect(0, 0, 196, 2);
vg[36].fillRect(0, 2, 2, 38);
vg[36].fillRect(2, 38, 196, 2);
vg[36].fillRect(196, 0, 2, 38);
vg[36].translate(-1, -1);
vg[36].setColor(new Color(255, 255, 255, 255));
vg[36].dispose();
vg[35].dispose();
vg[37] = (VectorGraphics)vg[6].create(400, 336, 200, 42);
vg[37].setColor(new Color(51, 51, 51, 255));
vg[37].setFont(new Font("Dialog", 0, 12));
vg[37].setColor(new Color(51, 51, 51, 255));
vg[37].setFont(new Font("Dialog", 0, 12));
vg[38] = (VectorGraphics)vg[37].create();
vg[38].setColorMode(2);
vg[38].setColor(new Color(255, 175, 175, 255));
vg[38].fillRect(3, 3, 194, 36);
vg[38].translate(0, 0);
vg[38].setColor(new Color(255, 255, 255, 255));
vg[38].fillRect(0, 0, 199, 1);
vg[38].fillRect(0, 1, 1, 41);
vg[38].fillRect(1, 41, 199, 1);
vg[38].fillRect(199, 0, 1, 41);
vg[38].translate(0, 0);
vg[38].setColor(new Color(255, 175, 175, 255));
vg[38].translate(1, 1);
vg[38].setColor(new Color(0, 0, 0, 255));
vg[38].fillRect(0, 0, 196, 2);
vg[38].fillRect(0, 2, 2, 38);
vg[38].fillRect(2, 38, 196, 2);
vg[38].fillRect(196, 0, 2, 38);
vg[38].translate(-1, -1);
vg[38].setColor(new Color(255, 175, 175, 255));
vg[38].dispose();
vg[37].dispose();
vg[39] = (VectorGraphics)vg[6].create(200, 336, 200, 42);
vg[39].setColor(new Color(51, 51, 51, 255));
vg[39].setFont(new Font("Dialog", 0, 12));
vg[39].setColor(new Color(51, 51, 51, 255));
vg[39].setFont(new Font("Dialog", 0, 12));
vg[40] = (VectorGraphics)vg[39].create();
vg[40].setColorMode(1);
vg[40].setColor(new Color(255, 175, 175, 255));
vg[40].fillRect(3, 3, 194, 36);
vg[40].translate(0, 0);
vg[40].setColor(new Color(255, 255, 255, 255));
vg[40].fillRect(0, 0, 199, 1);
vg[40].fillRect(0, 1, 1, 41);
vg[40].fillRect(1, 41, 199, 1);
vg[40].fillRect(199, 0, 1, 41);
vg[40].translate(0, 0);
vg[40].setColor(new Color(255, 175, 175, 255));
vg[40].translate(1, 1);
vg[40].setColor(new Color(0, 0, 0, 255));
vg[40].fillRect(0, 0, 196, 2);
vg[40].fillRect(0, 2, 2, 38);
vg[40].fillRect(2, 38, 196, 2);
vg[40].fillRect(196, 0, 2, 38);
vg[40].translate(-1, -1);
vg[40].setColor(new Color(255, 175, 175, 255));
vg[40].dispose();
vg[39].dispose();
vg[41] = (VectorGraphics)vg[6].create(0, 336, 200, 42);
vg[41].setColor(new Color(51, 51, 51, 255));
vg[41].setFont(new Font("Dialog", 0, 12));
vg[41].setColor(new Color(51, 51, 51, 255));
vg[41].setFont(new Font("Dialog", 0, 12));
vg[42] = (VectorGraphics)vg[41].create();
vg[42].setColorMode(0);
vg[42].setColor(new Color(255, 175, 175, 255));
vg[42].fillRect(3, 3, 194, 36);
vg[42].translate(0, 0);
vg[42].setColor(new Color(255, 255, 255, 255));
vg[42].fillRect(0, 0, 199, 1);
vg[42].fillRect(0, 1, 1, 41);
vg[42].fillRect(1, 41, 199, 1);
vg[42].fillRect(199, 0, 1, 41);
vg[42].translate(0, 0);
vg[42].setColor(new Color(255, 175, 175, 255));
vg[42].translate(1, 1);
vg[42].setColor(new Color(0, 0, 0, 255));
vg[42].fillRect(0, 0, 196, 2);
vg[42].fillRect(0, 2, 2, 38);
vg[42].fillRect(2, 38, 196, 2);
vg[42].fillRect(196, 0, 2, 38);
vg[42].translate(-1, -1);
vg[42].setColor(new Color(255, 175, 175, 255));
vg[42].dispose();
vg[41].dispose();
vg[43] = (VectorGraphics)vg[6].create(400, 294, 200, 42);
vg[43].setColor(new Color(51, 51, 51, 255));
vg[43].setFont(new Font("Dialog", 0, 12));
vg[43].setColor(new Color(51, 51, 51, 255));
vg[43].setFont(new Font("Dialog", 0, 12));
vg[44] = (VectorGraphics)vg[43].create();
vg[44].setColorMode(2);
vg[44].setColor(new Color(255, 200, 0, 255));
vg[44].fillRect(3, 3, 194, 36);
vg[44].translate(0, 0);
vg[44].setColor(new Color(255, 255, 255, 255));
vg[44].fillRect(0, 0, 199, 1);
vg[44].fillRect(0, 1, 1, 41);
vg[44].fillRect(1, 41, 199, 1);
vg[44].fillRect(199, 0, 1, 41);
vg[44].translate(0, 0);
vg[44].setColor(new Color(255, 200, 0, 255));
vg[44].translate(1, 1);
vg[44].setColor(new Color(0, 0, 0, 255));
vg[44].fillRect(0, 0, 196, 2);
vg[44].fillRect(0, 2, 2, 38);
vg[44].fillRect(2, 38, 196, 2);
vg[44].fillRect(196, 0, 2, 38);
vg[44].translate(-1, -1);
vg[44].setColor(new Color(255, 200, 0, 255));
vg[44].dispose();
vg[43].dispose();
vg[45] = (VectorGraphics)vg[6].create(200, 294, 200, 42);
vg[45].setColor(new Color(51, 51, 51, 255));
vg[45].setFont(new Font("Dialog", 0, 12));
vg[45].setColor(new Color(51, 51, 51, 255));
vg[45].setFont(new Font("Dialog", 0, 12));
vg[46] = (VectorGraphics)vg[45].create();
vg[46].setColorMode(1);
vg[46].setColor(new Color(255, 200, 0, 255));
vg[46].fillRect(3, 3, 194, 36);
vg[46].translate(0, 0);
vg[46].setColor(new Color(255, 255, 255, 255));
vg[46].fillRect(0, 0, 199, 1);
vg[46].fillRect(0, 1, 1, 41);
vg[46].fillRect(1, 41, 199, 1);
vg[46].fillRect(199, 0, 1, 41);
vg[46].translate(0, 0);
vg[46].setColor(new Color(255, 200, 0, 255));
vg[46].translate(1, 1);
vg[46].setColor(new Color(0, 0, 0, 255));
vg[46].fillRect(0, 0, 196, 2);
vg[46].fillRect(0, 2, 2, 38);
vg[46].fillRect(2, 38, 196, 2);
vg[46].fillRect(196, 0, 2, 38);
vg[46].translate(-1, -1);
vg[46].setColor(new Color(255, 200, 0, 255));
vg[46].dispose();
vg[45].dispose();
vg[47] = (VectorGraphics)vg[6].create(0, 294, 200, 42);
vg[47].setColor(new Color(51, 51, 51, 255));
vg[47].setFont(new Font("Dialog", 0, 12));
vg[47].setColor(new Color(51, 51, 51, 255));
vg[47].setFont(new Font("Dialog", 0, 12));
vg[48] = (VectorGraphics)vg[47].create();
vg[48].setColorMode(0);
vg[48].setColor(new Color(255, 200, 0, 255));
vg[48].fillRect(3, 3, 194, 36);
vg[48].translate(0, 0);
vg[48].setColor(new Color(255, 255, 255, 255));
vg[48].fillRect(0, 0, 199, 1);
vg[48].fillRect(0, 1, 1, 41);
vg[48].fillRect(1, 41, 199, 1);
Paint0s3.paint(vg);
} // paint
} // class Paint0s2
private static class Paint0s3 {
public static void paint(VectorGraphics[] vg) {
vg[48].fillRect(199, 0, 1, 41);
vg[48].translate(0, 0);
vg[48].setColor(new Color(255, 200, 0, 255));
vg[48].translate(1, 1);
vg[48].setColor(new Color(0, 0, 0, 255));
vg[48].fillRect(0, 0, 196, 2);
vg[48].fillRect(0, 2, 2, 38);
vg[48].fillRect(2, 38, 196, 2);
vg[48].fillRect(196, 0, 2, 38);
vg[48].translate(-1, -1);
vg[48].setColor(new Color(255, 200, 0, 255));
vg[48].dispose();
vg[47].dispose();
vg[49] = (VectorGraphics)vg[6].create(400, 252, 200, 42);
vg[49].setColor(new Color(51, 51, 51, 255));
vg[49].setFont(new Font("Dialog", 0, 12));
vg[49].setColor(new Color(51, 51, 51, 255));
vg[49].setFont(new Font("Dialog", 0, 12));
vg[50] = (VectorGraphics)vg[49].create();
vg[50].setColorMode(2);
vg[50].setColor(new Color(255, 255, 0, 255));
vg[50].fillRect(3, 3, 194, 36);
vg[50].translate(0, 0);
vg[50].setColor(new Color(255, 255, 255, 255));
vg[50].fillRect(0, 0, 199, 1);
vg[50].fillRect(0, 1, 1, 41);
vg[50].fillRect(1, 41, 199, 1);
vg[50].fillRect(199, 0, 1, 41);
vg[50].translate(0, 0);
vg[50].setColor(new Color(255, 255, 0, 255));
vg[50].translate(1, 1);
vg[50].setColor(new Color(0, 0, 0, 255));
vg[50].fillRect(0, 0, 196, 2);
vg[50].fillRect(0, 2, 2, 38);
vg[50].fillRect(2, 38, 196, 2);
vg[50].fillRect(196, 0, 2, 38);
vg[50].translate(-1, -1);
vg[50].setColor(new Color(255, 255, 0, 255));
vg[50].dispose();
vg[49].dispose();
vg[51] = (VectorGraphics)vg[6].create(200, 252, 200, 42);
vg[51].setColor(new Color(51, 51, 51, 255));
vg[51].setFont(new Font("Dialog", 0, 12));
vg[51].setColor(new Color(51, 51, 51, 255));
vg[51].setFont(new Font("Dialog", 0, 12));
vg[52] = (VectorGraphics)vg[51].create();
vg[52].setColorMode(1);
vg[52].setColor(new Color(255, 255, 0, 255));
vg[52].fillRect(3, 3, 194, 36);
vg[52].translate(0, 0);
vg[52].setColor(new Color(255, 255, 255, 255));
vg[52].fillRect(0, 0, 199, 1);
vg[52].fillRect(0, 1, 1, 41);
vg[52].fillRect(1, 41, 199, 1);
vg[52].fillRect(199, 0, 1, 41);
vg[52].translate(0, 0);
vg[52].setColor(new Color(255, 255, 0, 255));
vg[52].translate(1, 1);
vg[52].setColor(new Color(0, 0, 0, 255));
vg[52].fillRect(0, 0, 196, 2);
vg[52].fillRect(0, 2, 2, 38);
vg[52].fillRect(2, 38, 196, 2);
vg[52].fillRect(196, 0, 2, 38);
vg[52].translate(-1, -1);
vg[52].setColor(new Color(255, 255, 0, 255));
vg[52].dispose();
vg[51].dispose();
vg[53] = (VectorGraphics)vg[6].create(0, 252, 200, 42);
vg[53].setColor(new Color(51, 51, 51, 255));
vg[53].setFont(new Font("Dialog", 0, 12));
vg[53].setColor(new Color(51, 51, 51, 255));
vg[53].setFont(new Font("Dialog", 0, 12));
vg[54] = (VectorGraphics)vg[53].create();
vg[54].setColorMode(0);
vg[54].setColor(new Color(255, 255, 0, 255));
vg[54].fillRect(3, 3, 194, 36);
vg[54].translate(0, 0);
vg[54].setColor(new Color(255, 255, 255, 255));
vg[54].fillRect(0, 0, 199, 1);
vg[54].fillRect(0, 1, 1, 41);
vg[54].fillRect(1, 41, 199, 1);
vg[54].fillRect(199, 0, 1, 41);
vg[54].translate(0, 0);
vg[54].setColor(new Color(255, 255, 0, 255));
vg[54].translate(1, 1);
vg[54].setColor(new Color(0, 0, 0, 255));
vg[54].fillRect(0, 0, 196, 2);
vg[54].fillRect(0, 2, 2, 38);
vg[54].fillRect(2, 38, 196, 2);
vg[54].fillRect(196, 0, 2, 38);
vg[54].translate(-1, -1);
vg[54].setColor(new Color(255, 255, 0, 255));
vg[54].dispose();
vg[53].dispose();
vg[55] = (VectorGraphics)vg[6].create(400, 210, 200, 42);
vg[55].setColor(new Color(51, 51, 51, 255));
vg[55].setFont(new Font("Dialog", 0, 12));
vg[55].setColor(new Color(51, 51, 51, 255));
vg[55].setFont(new Font("Dialog", 0, 12));
vg[56] = (VectorGraphics)vg[55].create();
vg[56].setColorMode(2);
vg[56].setColor(new Color(255, 0, 255, 255));
vg[56].fillRect(3, 3, 194, 36);
vg[56].translate(0, 0);
vg[56].setColor(new Color(255, 255, 255, 255));
vg[56].fillRect(0, 0, 199, 1);
vg[56].fillRect(0, 1, 1, 41);
vg[56].fillRect(1, 41, 199, 1);
vg[56].fillRect(199, 0, 1, 41);
vg[56].translate(0, 0);
vg[56].setColor(new Color(255, 0, 255, 255));
vg[56].translate(1, 1);
vg[56].setColor(new Color(0, 0, 0, 255));
vg[56].fillRect(0, 0, 196, 2);
vg[56].fillRect(0, 2, 2, 38);
vg[56].fillRect(2, 38, 196, 2);
vg[56].fillRect(196, 0, 2, 38);
vg[56].translate(-1, -1);
vg[56].setColor(new Color(255, 0, 255, 255));
vg[56].dispose();
vg[55].dispose();
vg[57] = (VectorGraphics)vg[6].create(200, 210, 200, 42);
vg[57].setColor(new Color(51, 51, 51, 255));
vg[57].setFont(new Font("Dialog", 0, 12));
vg[57].setColor(new Color(51, 51, 51, 255));
vg[57].setFont(new Font("Dialog", 0, 12));
vg[58] = (VectorGraphics)vg[57].create();
vg[58].setColorMode(1);
vg[58].setColor(new Color(255, 0, 255, 255));
vg[58].fillRect(3, 3, 194, 36);
vg[58].translate(0, 0);
vg[58].setColor(new Color(255, 255, 255, 255));
vg[58].fillRect(0, 0, 199, 1);
vg[58].fillRect(0, 1, 1, 41);
vg[58].fillRect(1, 41, 199, 1);
vg[58].fillRect(199, 0, 1, 41);
vg[58].translate(0, 0);
vg[58].setColor(new Color(255, 0, 255, 255));
vg[58].translate(1, 1);
vg[58].setColor(new Color(0, 0, 0, 255));
vg[58].fillRect(0, 0, 196, 2);
vg[58].fillRect(0, 2, 2, 38);
vg[58].fillRect(2, 38, 196, 2);
vg[58].fillRect(196, 0, 2, 38);
vg[58].translate(-1, -1);
vg[58].setColor(new Color(255, 0, 255, 255));
vg[58].dispose();
vg[57].dispose();
vg[59] = (VectorGraphics)vg[6].create(0, 210, 200, 42);
vg[59].setColor(new Color(51, 51, 51, 255));
vg[59].setFont(new Font("Dialog", 0, 12));
vg[59].setColor(new Color(51, 51, 51, 255));
vg[59].setFont(new Font("Dialog", 0, 12));
vg[60] = (VectorGraphics)vg[59].create();
vg[60].setColorMode(0);
vg[60].setColor(new Color(255, 0, 255, 255));
vg[60].fillRect(3, 3, 194, 36);
vg[60].translate(0, 0);
vg[60].setColor(new Color(255, 255, 255, 255));
vg[60].fillRect(0, 0, 199, 1);
vg[60].fillRect(0, 1, 1, 41);
vg[60].fillRect(1, 41, 199, 1);
vg[60].fillRect(199, 0, 1, 41);
vg[60].translate(0, 0);
vg[60].setColor(new Color(255, 0, 255, 255));
vg[60].translate(1, 1);
vg[60].setColor(new Color(0, 0, 0, 255));
vg[60].fillRect(0, 0, 196, 2);
vg[60].fillRect(0, 2, 2, 38);
vg[60].fillRect(2, 38, 196, 2);
vg[60].fillRect(196, 0, 2, 38);
vg[60].translate(-1, -1);
vg[60].setColor(new Color(255, 0, 255, 255));
vg[60].dispose();
vg[59].dispose();
vg[61] = (VectorGraphics)vg[6].create(400, 168, 200, 42);
vg[61].setColor(new Color(51, 51, 51, 255));
vg[61].setFont(new Font("Dialog", 0, 12));
vg[61].setColor(new Color(51, 51, 51, 255));
vg[61].setFont(new Font("Dialog", 0, 12));
vg[62] = (VectorGraphics)vg[61].create();
vg[62].setColorMode(2);
vg[62].setColor(new Color(0, 255, 255, 255));
vg[62].fillRect(3, 3, 194, 36);
vg[62].translate(0, 0);
vg[62].setColor(new Color(255, 255, 255, 255));
vg[62].fillRect(0, 0, 199, 1);
vg[62].fillRect(0, 1, 1, 41);
vg[62].fillRect(1, 41, 199, 1);
vg[62].fillRect(199, 0, 1, 41);
vg[62].translate(0, 0);
vg[62].setColor(new Color(0, 255, 255, 255));
vg[62].translate(1, 1);
Paint0s4.paint(vg);
} // paint
} // class Paint0s3
private static class Paint0s4 {
public static void paint(VectorGraphics[] vg) {
vg[62].setColor(new Color(0, 0, 0, 255));
vg[62].fillRect(0, 0, 196, 2);
vg[62].fillRect(0, 2, 2, 38);
vg[62].fillRect(2, 38, 196, 2);
vg[62].fillRect(196, 0, 2, 38);
vg[62].translate(-1, -1);
vg[62].setColor(new Color(0, 255, 255, 255));
vg[62].dispose();
vg[61].dispose();
vg[63] = (VectorGraphics)vg[6].create(200, 168, 200, 42);
vg[63].setColor(new Color(51, 51, 51, 255));
vg[63].setFont(new Font("Dialog", 0, 12));
vg[63].setColor(new Color(51, 51, 51, 255));
vg[63].setFont(new Font("Dialog", 0, 12));
vg[64] = (VectorGraphics)vg[63].create();
vg[64].setColorMode(1);
vg[64].setColor(new Color(0, 255, 255, 255));
vg[64].fillRect(3, 3, 194, 36);
vg[64].translate(0, 0);
vg[64].setColor(new Color(255, 255, 255, 255));
vg[64].fillRect(0, 0, 199, 1);
vg[64].fillRect(0, 1, 1, 41);
vg[64].fillRect(1, 41, 199, 1);
vg[64].fillRect(199, 0, 1, 41);
vg[64].translate(0, 0);
vg[64].setColor(new Color(0, 255, 255, 255));
vg[64].translate(1, 1);
vg[64].setColor(new Color(0, 0, 0, 255));
vg[64].fillRect(0, 0, 196, 2);
vg[64].fillRect(0, 2, 2, 38);
vg[64].fillRect(2, 38, 196, 2);
vg[64].fillRect(196, 0, 2, 38);
vg[64].translate(-1, -1);
vg[64].setColor(new Color(0, 255, 255, 255));
vg[64].dispose();
vg[63].dispose();
vg[65] = (VectorGraphics)vg[6].create(0, 168, 200, 42);
vg[65].setColor(new Color(51, 51, 51, 255));
vg[65].setFont(new Font("Dialog", 0, 12));
vg[65].setColor(new Color(51, 51, 51, 255));
vg[65].setFont(new Font("Dialog", 0, 12));
vg[66] = (VectorGraphics)vg[65].create();
vg[66].setColorMode(0);
vg[66].setColor(new Color(0, 255, 255, 255));
vg[66].fillRect(3, 3, 194, 36);
vg[66].translate(0, 0);
vg[66].setColor(new Color(255, 255, 255, 255));
vg[66].fillRect(0, 0, 199, 1);
vg[66].fillRect(0, 1, 1, 41);
vg[66].fillRect(1, 41, 199, 1);
vg[66].fillRect(199, 0, 1, 41);
vg[66].translate(0, 0);
vg[66].setColor(new Color(0, 255, 255, 255));
vg[66].translate(1, 1);
vg[66].setColor(new Color(0, 0, 0, 255));
vg[66].fillRect(0, 0, 196, 2);
vg[66].fillRect(0, 2, 2, 38);
vg[66].fillRect(2, 38, 196, 2);
vg[66].fillRect(196, 0, 2, 38);
vg[66].translate(-1, -1);
vg[66].setColor(new Color(0, 255, 255, 255));
vg[66].dispose();
vg[65].dispose();
vg[67] = (VectorGraphics)vg[6].create(400, 126, 200, 42);
vg[67].setColor(new Color(51, 51, 51, 255));
vg[67].setFont(new Font("Dialog", 0, 12));
vg[67].setColor(new Color(51, 51, 51, 255));
vg[67].setFont(new Font("Dialog", 0, 12));
vg[68] = (VectorGraphics)vg[67].create();
vg[68].setColorMode(2);
vg[68].setColor(new Color(0, 0, 255, 255));
vg[68].fillRect(3, 3, 194, 36);
vg[68].translate(0, 0);
vg[68].setColor(new Color(255, 255, 255, 255));
vg[68].fillRect(0, 0, 199, 1);
vg[68].fillRect(0, 1, 1, 41);
vg[68].fillRect(1, 41, 199, 1);
vg[68].fillRect(199, 0, 1, 41);
vg[68].translate(0, 0);
vg[68].setColor(new Color(0, 0, 255, 255));
vg[68].translate(1, 1);
vg[68].setColor(new Color(0, 0, 0, 255));
vg[68].fillRect(0, 0, 196, 2);
vg[68].fillRect(0, 2, 2, 38);
vg[68].fillRect(2, 38, 196, 2);
vg[68].fillRect(196, 0, 2, 38);
vg[68].translate(-1, -1);
vg[68].setColor(new Color(0, 0, 255, 255));
vg[68].dispose();
vg[67].dispose();
vg[69] = (VectorGraphics)vg[6].create(200, 126, 200, 42);
vg[69].setColor(new Color(51, 51, 51, 255));
vg[69].setFont(new Font("Dialog", 0, 12));
vg[69].setColor(new Color(51, 51, 51, 255));
vg[69].setFont(new Font("Dialog", 0, 12));
vg[70] = (VectorGraphics)vg[69].create();
vg[70].setColorMode(1);
vg[70].setColor(new Color(0, 0, 255, 255));
vg[70].fillRect(3, 3, 194, 36);
vg[70].translate(0, 0);
vg[70].setColor(new Color(255, 255, 255, 255));
vg[70].fillRect(0, 0, 199, 1);
vg[70].fillRect(0, 1, 1, 41);
vg[70].fillRect(1, 41, 199, 1);
vg[70].fillRect(199, 0, 1, 41);
vg[70].translate(0, 0);
vg[70].setColor(new Color(0, 0, 255, 255));
vg[70].translate(1, 1);
vg[70].setColor(new Color(0, 0, 0, 255));
vg[70].fillRect(0, 0, 196, 2);
vg[70].fillRect(0, 2, 2, 38);
vg[70].fillRect(2, 38, 196, 2);
vg[70].fillRect(196, 0, 2, 38);
vg[70].translate(-1, -1);
vg[70].setColor(new Color(0, 0, 255, 255));
vg[70].dispose();
vg[69].dispose();
vg[71] = (VectorGraphics)vg[6].create(0, 126, 200, 42);
vg[71].setColor(new Color(51, 51, 51, 255));
vg[71].setFont(new Font("Dialog", 0, 12));
vg[71].setColor(new Color(51, 51, 51, 255));
vg[71].setFont(new Font("Dialog", 0, 12));
vg[72] = (VectorGraphics)vg[71].create();
vg[72].setColorMode(0);
vg[72].setColor(new Color(0, 0, 255, 255));
vg[72].fillRect(3, 3, 194, 36);
vg[72].translate(0, 0);
vg[72].setColor(new Color(255, 255, 255, 255));
vg[72].fillRect(0, 0, 199, 1);
vg[72].fillRect(0, 1, 1, 41);
vg[72].fillRect(1, 41, 199, 1);
vg[72].fillRect(199, 0, 1, 41);
vg[72].translate(0, 0);
vg[72].setColor(new Color(0, 0, 255, 255));
vg[72].translate(1, 1);
vg[72].setColor(new Color(0, 0, 0, 255));
vg[72].fillRect(0, 0, 196, 2);
vg[72].fillRect(0, 2, 2, 38);
vg[72].fillRect(2, 38, 196, 2);
vg[72].fillRect(196, 0, 2, 38);
vg[72].translate(-1, -1);
vg[72].setColor(new Color(0, 0, 255, 255));
vg[72].dispose();
vg[71].dispose();
vg[73] = (VectorGraphics)vg[6].create(400, 84, 200, 42);
vg[73].setColor(new Color(51, 51, 51, 255));
vg[73].setFont(new Font("Dialog", 0, 12));
vg[73].setColor(new Color(51, 51, 51, 255));
vg[73].setFont(new Font("Dialog", 0, 12));
vg[74] = (VectorGraphics)vg[73].create();
vg[74].setColorMode(2);
vg[74].setColor(new Color(0, 255, 0, 255));
vg[74].fillRect(3, 3, 194, 36);
vg[74].translate(0, 0);
vg[74].setColor(new Color(255, 255, 255, 255));
vg[74].fillRect(0, 0, 199, 1);
vg[74].fillRect(0, 1, 1, 41);
vg[74].fillRect(1, 41, 199, 1);
vg[74].fillRect(199, 0, 1, 41);
vg[74].translate(0, 0);
vg[74].setColor(new Color(0, 255, 0, 255));
vg[74].translate(1, 1);
vg[74].setColor(new Color(0, 0, 0, 255));
vg[74].fillRect(0, 0, 196, 2);
vg[74].fillRect(0, 2, 2, 38);
vg[74].fillRect(2, 38, 196, 2);
vg[74].fillRect(196, 0, 2, 38);
vg[74].translate(-1, -1);
vg[74].setColor(new Color(0, 255, 0, 255));
vg[74].dispose();
vg[73].dispose();
vg[75] = (VectorGraphics)vg[6].create(200, 84, 200, 42);
vg[75].setColor(new Color(51, 51, 51, 255));
vg[75].setFont(new Font("Dialog", 0, 12));
vg[75].setColor(new Color(51, 51, 51, 255));
vg[75].setFont(new Font("Dialog", 0, 12));
vg[76] = (VectorGraphics)vg[75].create();
vg[76].setColorMode(1);
vg[76].setColor(new Color(0, 255, 0, 255));
vg[76].fillRect(3, 3, 194, 36);
vg[76].translate(0, 0);
vg[76].setColor(new Color(255, 255, 255, 255));
vg[76].fillRect(0, 0, 199, 1);
vg[76].fillRect(0, 1, 1, 41);
vg[76].fillRect(1, 41, 199, 1);
vg[76].fillRect(199, 0, 1, 41);
vg[76].translate(0, 0);
vg[76].setColor(new Color(0, 255, 0, 255));
vg[76].translate(1, 1);
vg[76].setColor(new Color(0, 0, 0, 255));
vg[76].fillRect(0, 0, 196, 2);
vg[76].fillRect(0, 2, 2, 38);
vg[76].fillRect(2, 38, 196, 2);
Paint0s5.paint(vg);
} // paint
} // class Paint0s4
private static class Paint0s5 {
public static void paint(VectorGraphics[] vg) {
vg[76].fillRect(196, 0, 2, 38);
vg[76].translate(-1, -1);
vg[76].setColor(new Color(0, 255, 0, 255));
vg[76].dispose();
vg[75].dispose();
vg[77] = (VectorGraphics)vg[6].create(0, 84, 200, 42);
vg[77].setColor(new Color(51, 51, 51, 255));
vg[77].setFont(new Font("Dialog", 0, 12));
vg[77].setColor(new Color(51, 51, 51, 255));
vg[77].setFont(new Font("Dialog", 0, 12));
vg[78] = (VectorGraphics)vg[77].create();
vg[78].setColorMode(0);
vg[78].setColor(new Color(0, 255, 0, 255));
vg[78].fillRect(3, 3, 194, 36);
vg[78].translate(0, 0);
vg[78].setColor(new Color(255, 255, 255, 255));
vg[78].fillRect(0, 0, 199, 1);
vg[78].fillRect(0, 1, 1, 41);
vg[78].fillRect(1, 41, 199, 1);
vg[78].fillRect(199, 0, 1, 41);
vg[78].translate(0, 0);
vg[78].setColor(new Color(0, 255, 0, 255));
vg[78].translate(1, 1);
vg[78].setColor(new Color(0, 0, 0, 255));
vg[78].fillRect(0, 0, 196, 2);
vg[78].fillRect(0, 2, 2, 38);
vg[78].fillRect(2, 38, 196, 2);
vg[78].fillRect(196, 0, 2, 38);
vg[78].translate(-1, -1);
vg[78].setColor(new Color(0, 255, 0, 255));
vg[78].dispose();
vg[77].dispose();
vg[79] = (VectorGraphics)vg[6].create(400, 42, 200, 42);
vg[79].setColor(new Color(51, 51, 51, 255));
vg[79].setFont(new Font("Dialog", 0, 12));
vg[79].setColor(new Color(51, 51, 51, 255));
vg[79].setFont(new Font("Dialog", 0, 12));
vg[80] = (VectorGraphics)vg[79].create();
vg[80].setColorMode(2);
vg[80].setColor(new Color(255, 0, 0, 255));
vg[80].fillRect(3, 3, 194, 36);
vg[80].translate(0, 0);
vg[80].setColor(new Color(255, 255, 255, 255));
vg[80].fillRect(0, 0, 199, 1);
vg[80].fillRect(0, 1, 1, 41);
vg[80].fillRect(1, 41, 199, 1);
vg[80].fillRect(199, 0, 1, 41);
vg[80].translate(0, 0);
vg[80].setColor(new Color(255, 0, 0, 255));
vg[80].translate(1, 1);
vg[80].setColor(new Color(0, 0, 0, 255));
vg[80].fillRect(0, 0, 196, 2);
vg[80].fillRect(0, 2, 2, 38);
vg[80].fillRect(2, 38, 196, 2);
vg[80].fillRect(196, 0, 2, 38);
vg[80].translate(-1, -1);
vg[80].setColor(new Color(255, 0, 0, 255));
vg[80].dispose();
vg[79].dispose();
vg[81] = (VectorGraphics)vg[6].create(200, 42, 200, 42);
vg[81].setColor(new Color(51, 51, 51, 255));
vg[81].setFont(new Font("Dialog", 0, 12));
vg[81].setColor(new Color(51, 51, 51, 255));
vg[81].setFont(new Font("Dialog", 0, 12));
vg[82] = (VectorGraphics)vg[81].create();
vg[82].setColorMode(1);
vg[82].setColor(new Color(255, 0, 0, 255));
vg[82].fillRect(3, 3, 194, 36);
vg[82].translate(0, 0);
vg[82].setColor(new Color(255, 255, 255, 255));
vg[82].fillRect(0, 0, 199, 1);
vg[82].fillRect(0, 1, 1, 41);
vg[82].fillRect(1, 41, 199, 1);
vg[82].fillRect(199, 0, 1, 41);
vg[82].translate(0, 0);
vg[82].setColor(new Color(255, 0, 0, 255));
vg[82].translate(1, 1);
vg[82].setColor(new Color(0, 0, 0, 255));
vg[82].fillRect(0, 0, 196, 2);
vg[82].fillRect(0, 2, 2, 38);
vg[82].fillRect(2, 38, 196, 2);
vg[82].fillRect(196, 0, 2, 38);
vg[82].translate(-1, -1);
vg[82].setColor(new Color(255, 0, 0, 255));
vg[82].dispose();
vg[81].dispose();
vg[83] = (VectorGraphics)vg[6].create(0, 42, 200, 42);
vg[83].setColor(new Color(51, 51, 51, 255));
vg[83].setFont(new Font("Dialog", 0, 12));
vg[83].setColor(new Color(51, 51, 51, 255));
vg[83].setFont(new Font("Dialog", 0, 12));
vg[84] = (VectorGraphics)vg[83].create();
vg[84].setColorMode(0);
vg[84].setColor(new Color(255, 0, 0, 255));
vg[84].fillRect(3, 3, 194, 36);
vg[84].translate(0, 0);
vg[84].setColor(new Color(255, 255, 255, 255));
vg[84].fillRect(0, 0, 199, 1);
vg[84].fillRect(0, 1, 1, 41);
vg[84].fillRect(1, 41, 199, 1);
vg[84].fillRect(199, 0, 1, 41);
vg[84].translate(0, 0);
vg[84].setColor(new Color(255, 0, 0, 255));
vg[84].translate(1, 1);
vg[84].setColor(new Color(0, 0, 0, 255));
vg[84].fillRect(0, 0, 196, 2);
vg[84].fillRect(0, 2, 2, 38);
vg[84].fillRect(2, 38, 196, 2);
vg[84].fillRect(196, 0, 2, 38);
vg[84].translate(-1, -1);
vg[84].setColor(new Color(255, 0, 0, 255));
vg[84].dispose();
vg[83].dispose();
vg[85] = (VectorGraphics)vg[6].create(400, 0, 200, 42);
vg[85].setColor(new Color(51, 51, 51, 255));
vg[85].setFont(new Font("Dialog", 1, 12));
vg[85].setColor(new Color(51, 51, 51, 255));
vg[85].setFont(new Font("Dialog", 1, 12));
vg[86] = (VectorGraphics)vg[85].create();
vg[87] = (VectorGraphics)vg[86].create();
vg[87].setColor(new Color(51, 51, 51, 255));
vg[87].drawString("Black and White", 0, 26);
vg[87].dispose();
vg[86].dispose();
vg[85].dispose();
vg[88] = (VectorGraphics)vg[6].create(200, 0, 200, 42);
vg[88].setColor(new Color(51, 51, 51, 255));
vg[88].setFont(new Font("Dialog", 1, 12));
vg[88].setColor(new Color(51, 51, 51, 255));
vg[88].setFont(new Font("Dialog", 1, 12));
vg[89] = (VectorGraphics)vg[88].create();
vg[90] = (VectorGraphics)vg[89].create();
vg[90].setColor(new Color(51, 51, 51, 255));
vg[90].drawString("GrayScale", 0, 26);
vg[90].dispose();
vg[89].dispose();
vg[88].dispose();
vg[91] = (VectorGraphics)vg[6].create(0, 0, 200, 42);
vg[91].setColor(new Color(51, 51, 51, 255));
vg[91].setFont(new Font("Dialog", 1, 12));
vg[91].setColor(new Color(51, 51, 51, 255));
vg[91].setFont(new Font("Dialog", 1, 12));
vg[92] = (VectorGraphics)vg[91].create();
vg[93] = (VectorGraphics)vg[92].create();
vg[93].setColor(new Color(51, 51, 51, 255));
vg[93].drawString("Color", 0, 26);
vg[93].dispose();
vg[92].dispose();
vg[91].dispose();
vg[6].dispose();
vg[4].dispose();
vg[3].dispose();
vg[2].dispose();
vg[1].dispose();
} // paint
} // class Paint0s5
private VectorGraphics vg[] = new VectorGraphics[94];
public static void main(String[] args) throws Exception {
new TestPrintColors(args).runTest(600, 600);
}
} // class
src/test/resources/org/freehep/graphicsio/java/test/TestImage2D.java 0000644 0001750 0001750 00000004003 10407470034 025022 0 ustar user01 user01 // AUTOMATICALLY GENERATED by FreeHEP JAVAGraphics2D
package org.freehep.graphicsio.java.test;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import org.freehep.graphics2d.VectorGraphics;
import org.freehep.graphicsio.test.TestingPanel;
public class TestImage2D extends TestingPanel {
public TestImage2D(String[] args) throws Exception {
super(args);
setName("TestImage2D");
} // contructor
public void paint(Graphics g) {
vg[0] = VectorGraphics.create(g);
vg[0].setCreator("FreeHEP JAVAGraphics2D");
Paint0s0.paint(vg);
} // paint
private static class Paint0s0 {
public static void paint(VectorGraphics[] vg) {
vg[0].setColor(new Color(51, 51, 51, 255));
vg[0].setFont(new Font("Dialog", 0, 12));
vg[1] = (VectorGraphics)vg[0].create();
vg[1].setClip(0, 0, 600, 600);
vg[1].setColor(new Color(255, 255, 255, 255));
vg[1].fillRect(0, 0, 600, 600);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), new AffineTransform(1.0, 0.0, 0.0, 1.0, 0.0, 0.0), null);
vg[1].shear(0.2, 0.2);
vg[1].drawImage(new BufferedImage(256, 256, BufferedImage.TYPE_INT_ARGB), new AffineTransform(0.8775825618903728, 0.479425538604203, -0.7427003071713147, 0.7337549003091118, 238.47021987841822, 95.15427810070022), null);
System.err.println("class org.freehep.graphicsio.java.JAVAGraphics2D: drawImage(BufferedImage, BufferedImageOp, int, int) not implemented.");
vg[1].setTransform(new AffineTransform(1.0, 0.0, 0.0, 1.0, 0.0, 0.0));
vg[1].dispose();
} // paint
} // class Paint0s0
private VectorGraphics vg[] = new VectorGraphics[2];
public static void main(String[] args) throws Exception {
new TestImage2D(args).runTest(600, 600);
}
} // class