Package org.geotools.styling.visitor
Class DpiRescaleStyleVisitor
- Object
-
- DuplicatingStyleVisitor
-
- RescaleStyleVisitor
-
- DpiRescaleStyleVisitor
-
- All Implemented Interfaces:
StyleVisitor
- Direct Known Subclasses:
GraphicsAwareDpiRescaleStyleVisitor
public class DpiRescaleStyleVisitor extends RescaleStyleVisitor
This is a style visitor that will produce a copy of the provided style. The copy will be rescaled by a provided factor if UOM is PIXEL.
-
-
Field Summary
-
Fields inherited from class RescaleStyleVisitor
defaultUnit, scale
-
Fields inherited from class DuplicatingStyleVisitor
copyFilter, ff, pages, sf, STRICT
-
-
Constructor Summary
Constructors Constructor Description DpiRescaleStyleVisitor(double scale)
DpiRescaleStyleVisitor(FilterFactory filterFactory, double scale)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Expression
rescale(Expression expr)
Used to rescale the provided expr.protected void
rescaleOption(Map<String,String> options, String key, double defaultValue)
Rescales the specified vendor optionprotected void
rescaleOption(Map<String,String> options, String key, int defaultValue)
Rescales the specified vendor option-
Methods inherited from class RescaleStyleVisitor
rescale, rescaleArrayOption, rescaleDashArray, rescaleGraphicSize, visit, visit, visit, visit, visit, visit, visit, visit
-
Methods inherited from class DuplicatingStyleVisitor
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
-
-
-
-
Constructor Detail
-
DpiRescaleStyleVisitor
public DpiRescaleStyleVisitor(double scale)
-
DpiRescaleStyleVisitor
public DpiRescaleStyleVisitor(FilterFactory filterFactory, double scale)
-
-
Method Detail
-
rescale
protected Expression rescale(Expression expr)
Description copied from class:RescaleStyleVisitor
Used to rescale the provided expr.We do optimize the case where the provided expression is a literal; no sense doing a calculation each time if we don't have to.
- Overrides:
rescale
in classRescaleStyleVisitor
- Returns:
- expr multiplied by the provided scale
-
rescaleOption
protected void rescaleOption(Map<String,String> options, String key, double defaultValue)
Description copied from class:RescaleStyleVisitor
Rescales the specified vendor option- Overrides:
rescaleOption
in classRescaleStyleVisitor
-
rescaleOption
protected void rescaleOption(Map<String,String> options, String key, int defaultValue)
Description copied from class:RescaleStyleVisitor
Rescales the specified vendor option- Overrides:
rescaleOption
in classRescaleStyleVisitor
-
-