public class UomRescaleStyleVisitor extends DuplicatingStyleVisitor
This visitor extends DuplicatingStyleVisitor and as such yields a copy of the original
Style. Usage is simply to call the desired visit() method and then call getCopy() to retrieve the
result.
copyFilter, ff, pages, sf, STRICT| Constructor and Description |
|---|
UomRescaleStyleVisitor(double mapScale)
Constructor: requires the current mapScale to inform the window to viewport (world to screen)
relation in order to correctly rescaleDashArray sizes according to units of measure given in
world units (e.g., SI.METRE, USCustomary.FOOT, etc).
|
| Modifier and Type | Method and Description |
|---|---|
protected Expression |
rescale(Expression unscaled,
Unit<Length> uom)
Used to rescaleDashArray the provided unscaled value.
|
protected String |
rescale(String unscaled,
Unit<Length> uom)
Used to rescaleDashArray the provided unscaled value.
|
protected List<Expression> |
rescaleDashArray(List<Expression> expressions,
Unit<Length> uom)
Rescale a list of expressions, can handle null.
|
protected void |
rescaleStroke(Stroke stroke,
Unit<Length> uom)
Used to rescaleDashArray the provided stroke.
|
void |
visit(LineSymbolizer line)
Called when accept is called on a linesymbolizer
|
void |
visit(PointSymbolizer ps)
Called when accept is called on a pointsymbolizer
|
void |
visit(PolygonSymbolizer poly)
Called when accept is called on a polygon symbolizer
|
void |
visit(TextSymbolizer text)
Called when accept is called on a textsymbolizer
|
copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copy, copyExpressions, copyFonts, getCopy, setStrict, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitpublic UomRescaleStyleVisitor(double mapScale)
mapScale - The specified map scale, given in pixels per meter.protected Expression rescale(Expression unscaled, Unit<Length> uom)
unscaled - the unscaled value.mapScale - the mapScale in pixels per meter.uom - the unit of measure that will be used to scale.protected List<Expression> rescaleDashArray(List<Expression> expressions, Unit<Length> uom)
protected String rescale(String unscaled, Unit<Length> uom)
unscaled - the unscaled value.mapScale - the mapScale in pixels per meter.uom - the unit of measure that will be used to scale.protected void rescaleStroke(Stroke stroke, Unit<Length> uom)
stroke - the unscaled stroke, which will be modified in-place.mapScale - the mapScale in pixels per meter.uom - the unit of measure that will be used to scale.public void visit(PointSymbolizer ps)
StyleVisitorvisit in interface StyleVisitorvisit in class DuplicatingStyleVisitorps - the point symbolizer to visitpublic void visit(LineSymbolizer line)
StyleVisitorvisit in interface StyleVisitorvisit in class DuplicatingStyleVisitorline - the line symbolizer to visitpublic void visit(PolygonSymbolizer poly)
StyleVisitorvisit in interface StyleVisitorvisit in class DuplicatingStyleVisitorpoly - the polygon symbolizer to visitpublic void visit(TextSymbolizer text)
StyleVisitorvisit in interface StyleVisitorvisit in class DuplicatingStyleVisitortext - the text symbolizer to visitCopyright © 1996–2019 Geotools. All rights reserved.