Path: blob/master/SLICK_HOME/src/org/newdawn/slick/svg/Figure.java
1463 views
package org.newdawn.slick.svg;12import org.newdawn.slick.geom.Shape;3import org.newdawn.slick.geom.Transform;45/**6* A figure that is part of diagram loaded from SVG7*8* @author kevin9*/10public class Figure {11/** Ellipse Type */12public static final int ELLIPSE = 1;13/** Line Type */14public static final int LINE = 2;15/** Rectangle Type */16public static final int RECTANGLE = 3;17/** Path Type */18public static final int PATH = 4;19/** Polygon Type */20public static final int POLYGON = 5;2122/** The type of this figure */23private int type;2425/** The geometric shape of the figure */26private Shape shape;27/** The other bits of data assocaited with the SVG element */28private NonGeometricData data;29/** The transform that has already been applied to the shape */30private Transform transform;3132/**33* Create a new figure34*35* @param type The type of the figure36* @param shape The shape of the figure37* @param data The other associated data38* @param transform The transform that was applied to the shape39*/40public Figure(int type, Shape shape, NonGeometricData data, Transform transform) {41this.shape = shape;42this.data = data;43this.type = type;44this.transform = transform;45}4647/**48* Get the transform that was applied to the shape given in the SVG49* to get it to it's currently state50*51* @return The transform specified in the SVG52*/53public Transform getTransform() {54return transform;55}5657/**58* Get the type of this figure59*60* @return The type of this figure61*/62public int getType() {63return type;64}6566/**67* Get the shape of this figure68*69* @return The shape of this figure70*/71public Shape getShape() {72return shape;73}7475/**76* Get the data associated with this figure77*78* @return The data associated with this figure79*/80public NonGeometricData getData() {81return data;82}83}848586