| java.lang.Object net.refractions.udig.ui.Drawing
Drawing | final public class Drawing (Code) | | Drawing utitlity package - make your own previes and glyphs!
author: jones since: 0.6.0 |
Method Summary | |
public static Drawing | create() Retrieve the default Drawing implementation. | public static ViewportGraphics | createGraphics(GC gc, Display display, Dimension displaySize) Creates a ViewportGraphics object based backed by SWT. | public static ViewportGraphics | createGraphics(Graphics2D graphics) Creates a ViewportGraphics object based backed by SWT. | public void | drawDirect(Image image, Display display, Feature feature, Style style) Used to draw a freature directly onto the provided image. | public void | drawDirect(Image image, Display display, Feature feature, Rule rule) | public void | drawFeature(ViewportGraphics graphics, Feature feature, AffineTransform worldToScreenTransform, boolean drawVertices, MathTransform mt) | public void | drawFeature(ViewportGraphics graphics, Feature feature, AffineTransform worldToScreenTransform) | public void | drawFeature(ViewportGraphics graphics, Feature feature, AffineTransform worldToScreenTransform, Style style) | public void | drawFeature(ViewportGraphics graphics, Feature feature, Style style, AffineTransform worldToScreenTransform) | public void | drawFeature(ViewportGraphics graphics, Feature feature, AffineTransform worldToScreenTransform, boolean drawVertices, Symbolizer[] symbs, MathTransform mt) | public void | drawFeature(ViewportGraphics graphics, Feature feature, AffineTransform worldToScreenTransform, boolean drawVertices, Symbolizer symbolizer, MathTransform mathTransform, LiteShape shape) | public Feature | feature(Geometry geom) Just a convinient method to create feature from geometry. | public Feature | feature(Point point) Simple feature with one attribute called "point". | public Feature | feature(LineString line) Simple Feature with a default geometry and no attribtues. | public Feature | feature(Polygon polygon) Simple Feature with a default geometry and no attribtues. | public Feature | feature(MultiPoint multipoint) Simple Feature with a default geometry and no attribtues. | public Feature | feature(MultiLineString multilinestring) Simple Feature with a default geometry and no attribtues. | public Feature | feature(MultiPolygon multipolygon) Simple Feature with a default geometry and no attribtues. | Symbolizer[] | getSymbolizers(Style style) | Symbolizer[] | getSymbolizers(Rule rule) | public static Symbolizer[] | getSymbolizers(Feature feature) | public static Symbolizer[] | getSymbolizers(Class<? extends Geometry> type, Color baseColor) | public static Symbolizer[] | getSymbolizers(Class<? extends Geometry> type, Color baseColor, boolean useTransparency) | public LineString | line(int[] xy) | public MultiLineString | lines(int[][] xy) | public Point | point(int x, int y) | public Polygon | polygon(int[] xy) Convience constructor for GeometryFactory.createPolygon.
The provided xy ordinates are turned into a linear rings.
Parameters: xy - Two dimensional ordiantes. | public Polygon | polygon(int[] xy, int[] holes) Convience constructor for GeometryFactory.createPolygon.
The provided xy and holes are turned into linear rings.
Parameters: xy - Two dimensional ordiantes. Parameters: holes - Holes in polygon or null. | public LinearRing | ring(int[] xy) Convience constructor for GeometryFactory.createLinearRing.
Parameters: xy - Two dimensional ordiantes. | public FeatureType | schema(String name, String spec) Create a FeatureType schema using a type short hand. | public java.awt.Point | worldToPixel(Coordinate coord, AffineTransform worldToScreenTransform) | public static AffineTransform | worldToScreenTransform(Envelope mapExtent, Rectangle screenSize) TODO summary sentence for worldToScreenTransform ... |
lineSchema | static FeatureType lineSchema(Code) | | |
multilineSchema | static FeatureType multilineSchema(Code) | | |
multipointSchema | static FeatureType multipointSchema(Code) | | |
multipolygonSchema | static FeatureType multipolygonSchema(Code) | | |
pointSchema | static FeatureType pointSchema(Code) | | |
polygonSchema | static FeatureType polygonSchema(Code) | | |
create | public static Drawing create()(Code) | | Retrieve the default Drawing implementation.
Drawing ready for use |
createGraphics | public static ViewportGraphics createGraphics(GC gc, Display display, Dimension displaySize)(Code) | | Creates a ViewportGraphics object based backed by SWT.
REMEMBER to dispose of graphics.
Parameters: gc - A SWT GC object that the ViewportGraphics object will draw on. Parameters: display - The display object that will be used to create new Parameters: displaySize - Wrapper around a normal SWT Image |
createGraphics | public static ViewportGraphics createGraphics(Graphics2D graphics)(Code) | | Creates a ViewportGraphics object based backed by SWT.
Parameters: graphics - Wrapper allowing system to draw onto j2d images |
drawDirect | public void drawDirect(Image image, Display display, Feature feature, Style style)(Code) | | Used to draw a freature directly onto the provided image.
Feature coordintes are in the same coordinates as the image.
You may call this method multiple times to draw several features onto the same
Image (say for glyph creation).
Parameters: image - Image to render on to Parameters: display - Needed to create Colors for image Parameters: feature - Feature to be rendered Parameters: style - Style to render feature with |
drawDirect | public void drawDirect(Image image, Display display, Feature feature, Rule rule)(Code) | | |
drawFeature | public void drawFeature(ViewportGraphics graphics, Feature feature, AffineTransform worldToScreenTransform, boolean drawVertices, Symbolizer symbolizer, MathTransform mathTransform, LiteShape shape)(Code) | | |
feature | public Feature feature(Geometry geom)(Code) | | Just a convinient method to create feature from geometry.
Parameters: geom - the geometry to create feature from feature instance |
feature | public Feature feature(Point point)(Code) | | Simple feature with one attribute called "point".
Parameters: point - Feature with a default geometry and no attribtues |
feature | public Feature feature(LineString line)(Code) | | Simple Feature with a default geometry and no attribtues.
Parameters: line - Feature with a default geometry and no attribtues |
feature | public Feature feature(Polygon polygon)(Code) | | Simple Feature with a default geometry and no attribtues.
Parameters: polygon - Feature with a default geometry and no attribtues |
feature | public Feature feature(MultiPoint multipoint)(Code) | | Simple Feature with a default geometry and no attribtues.
Parameters: multipoint - Feature with a default geometry and no attribtues |
feature | public Feature feature(MultiLineString multilinestring)(Code) | | Simple Feature with a default geometry and no attribtues.
Parameters: multilinestring - Feature with a default geometry and no attribtues |
feature | public Feature feature(MultiPolygon multipolygon)(Code) | | Simple Feature with a default geometry and no attribtues.
Parameters: multipolygon - Feature with a default geometry and no attribtues |
getSymbolizers | Symbolizer[] getSymbolizers(Style style)(Code) | | |
getSymbolizers | Symbolizer[] getSymbolizers(Rule rule)(Code) | | |
getSymbolizers | public static Symbolizer[] getSymbolizers(Feature feature)(Code) | | |
getSymbolizers | public static Symbolizer[] getSymbolizers(Class<? extends Geometry> type, Color baseColor)(Code) | | |
getSymbolizers | public static Symbolizer[] getSymbolizers(Class<? extends Geometry> type, Color baseColor, boolean useTransparency)(Code) | | |
line | public LineString line(int[] xy)(Code) | | Generate LineStrings from two dimensional ordinates
Parameters: xy - LineStirng |
lines | public MultiLineString lines(int[][] xy)(Code) | | Generate a MultiLineString from two dimensional ordinates
Parameters: xy - MultiLineStirng |
point | public Point point(int x, int y)(Code) | | Generate Point from two dimensional ordinates
Parameters: x - Parameters: y - Point |
polygon | public Polygon polygon(int[] xy)(Code) | | Convience constructor for GeometryFactory.createPolygon.
The provided xy ordinates are turned into a linear rings.
Parameters: xy - Two dimensional ordiantes. Polygon |
polygon | public Polygon polygon(int[] xy, int[] holes)(Code) | | Convience constructor for GeometryFactory.createPolygon.
The provided xy and holes are turned into linear rings.
Parameters: xy - Two dimensional ordiantes. Parameters: holes - Holes in polygon or null. Polygon |
ring | public LinearRing ring(int[] xy)(Code) | | Convience constructor for GeometryFactory.createLinearRing.
Parameters: xy - Two dimensional ordiantes. LinearRing for use with polygon |
schema | public FeatureType schema(String name, String spec)(Code) | | Create a FeatureType schema using a type short hand.
Code Example:
new Drawing().schema("namespace.typename", "id:0,*geom:LineString,name:String,*centroid:Point");
- FeatureType with identifier "namespace.typename"
- Default Geometry "geom" of type LineStirng indicated with a "*"
- Three attributes: id of type Integer, name of type String and centroid of type Point
Parameters: name - namespace.name Parameters: spec - Generated FeatureType |
worldToScreenTransform | public static AffineTransform worldToScreenTransform(Envelope mapExtent, Rectangle screenSize)(Code) | | TODO summary sentence for worldToScreenTransform ...
Parameters: bounds - Parameters: rectangle - |
|
|