Class RescaleStyleVisitor

  • All Implemented Interfaces:
    StyleVisitor
    Direct Known Subclasses:
    DpiRescaleStyleVisitor

    public class RescaleStyleVisitor
    extends DuplicatingStyleVisitor
    This is a style visitor that will produce a copy of the provided style rescaled by a provided factor.

    The provided scale will be use to modify all line widths, font sizes and so forth. We may need to go the extra distance and play with the min/max scale on rules, and if there is any DPI specific madness going on we are going to cry.

    According to the specification we are supposed to use environmental variables to make our styles render in a resolution independent manner. The current GeoTools environment variable visitor only does processing for mapscale but does not have a dpi substitution. On the plus side this visitor accepts a general Expression and you are free to use an environmental variable expression in order to make sure a normal base style is tweaked in all the right spots.

    Author:
    Jody Garnett (Refractions Research)
    • Field Detail

      • scale

        protected Expression scale
        This is the scale used as a multiplication factory for everything that has a size.
      • defaultUnit

        protected Unit<Length> defaultUnit
    • Constructor Detail

      • RescaleStyleVisitor

        public RescaleStyleVisitor​(double scale)
      • RescaleStyleVisitor

        public RescaleStyleVisitor​(Expression scale)
      • RescaleStyleVisitor

        public RescaleStyleVisitor​(FilterFactory filterFactory,
                                   double scale)