Class Style.Builder

java.lang.Object
org.oscim.layers.vector.geometries.Style.Builder
Enclosing class:
Style

public static class Style.Builder extends Object
Geometry style builder. Usage example:

 {
     Style style = Style.builder()
         .strokeWidth(1f).strokeColor(Color.BLACK).build();
 }
 
  • Field Details

    • strokeColor

      public int strokeColor
    • cap

      public org.oscim.backend.canvas.Paint.Cap cap
    • fixed

      public boolean fixed
    • strokeIncrease

      public double strokeIncrease
    • blur

      public float blur
    • stipple

      public int stipple
    • stippleColor

      public int stippleColor
    • stippleWidth

      public float stippleWidth
    • texture

      public org.oscim.renderer.bucket.TextureItem texture
    • dropDistance

      public float dropDistance
    • textureRepeat

      public boolean textureRepeat
    • heightOffset

      public float heightOffset
    • randomOffset

      public boolean randomOffset
    • transparent

      public boolean transparent
  • Constructor Details

    • Builder

      protected Builder()
  • Method Details

    • build

      public Style build()
      Builds the GeometryStyle from the specified parameters.
    • strokeWidth

      public Style.Builder strokeWidth(float lineWidth)
      Sets the line width for the geometry's line or outline.
    • strokeColor

      public Style.Builder strokeColor(int strokeColor)
      Sets the color for the geometry's line or outline.
    • strokeColor

      public Style.Builder strokeColor(String strokeColor)
      Sets the color for the geometry's line or outline.
    • fillColor

      public Style.Builder fillColor(int fillColor)
      Sets the color for the geometry's area.
    • fillColor

      public Style.Builder fillColor(String fillColor)
      Sets the color for the geometry's area.
    • fillAlpha

      public Style.Builder fillAlpha(float fillAlpha)
      Sets alpha channel value for the geometry's area.
    • buffer

      public Style.Builder buffer(double buffer)
      This function has effect only on Points: use it to control the size on the circle that will be built from a buffer around the point.
    • scaleZoomLevel

      public Style.Builder scaleZoomLevel(int zoomlvl)
      This function has effect only on Points: use it to specify from which zoom level the point should stop decreasing in size and "stick to the map".
    • generalization

      public Style.Builder generalization(int generalization)
      Sets generalization factor for the geometry. Use predefined GeometryStyle.GENERALIZATION_HIGH, GENERALIZATION_MEDIUM or GENERALIZATION_SMALL
    • cap

      public Style.Builder cap(org.oscim.backend.canvas.Paint.Cap cap)
    • fixed

      public Style.Builder fixed(boolean b)
    • strokeIncrease

      public Style.Builder strokeIncrease(double strokeIncrease)
    • blur

      public Style.Builder blur(float blur)
    • stipple

      public Style.Builder stipple(int width)
    • stippleColor

      public Style.Builder stippleColor(int color)
    • stippleColor

      public Style.Builder stippleColor(String color)
    • stippleWidth

      public Style.Builder stippleWidth(float width)
    • texture

      public Style.Builder texture(org.oscim.renderer.bucket.TextureItem texture)
    • dropDistance

      public Style.Builder dropDistance(float dropDistance)
    • textureRepeat

      public Style.Builder textureRepeat(boolean textureRepeat)
    • heightOffset

      public Style.Builder heightOffset(float heightOffset)
    • randomOffset

      public Style.Builder randomOffset(boolean randomOffset)
    • transparent

      public Style.Builder transparent(boolean transparent)