Interface GlyphFactory

  • All Known Implementing Classes:
    DefaultGlyphFactory

    public interface GlyphFactory
    Used to draw the little pictures that appear in a Legend.

    We are making this an interface so that applications can implement their own icons as needed.

    Author:
    Jody Garnett
    • Method Detail

      • point

        Icon point​(Color point,
                   Color fill)
        Produce a simple Icon representing a point.
        Parameters:
        point - Color of the Point
        fill - Color inside the Point
        Returns:
        Icon representing a Point
      • point

        Icon point​(Rule rule)
        Produce a simple Icon representing a point.

        At a minimum this code is the same as:

        
         PointSymbolizer symbolizer = SLD.pointSymbolizer( rule );
         return glyphFactory.point( SLD.pointColor( symbolizer ), SLD.fillColor( symbolizer ) );
         

        Implementations have the option of going into greater detail, picking up on TextSymbolizers and so on.

        Parameters:
        rule - Rule used to render a Point
        Returns:
        Icon representing a Point
      • line

        Icon line​(Color line,
                  int width)
        Produces a simple Icon representing a line.
        Parameters:
        line - Line colour
        width - Line width
      • line

        Icon line​(Rule rule)
        Produce a simple Icon representing a point.

        At a minimum this code is the same as:

        
         LineSymbolizer symbolizer = SLD.lineSymbolizer( rule );
         return glyphFactory.point( SLD.lineColor( symbolizer ), SLD.lineWidth( symbolizer ) );
         

        Implementations have the option of going into greater detail, picking up on TextSymbolizers and so on.

        Parameters:
        rule - Rule used to render a Point
        Returns:
        Icon representing a Point
      • geometry

        Icon geometry​(Rule rule)
      • icon

        Icon icon​(Layer layer)
        Glyph for the provided layer.

        At a minimum the icon will be based on:

        • layer schema, will be considered a generic geometry if not recognized
        • layer style, defaults will be used if not recognized
        Returns:
        Icon For the provided layer