Class TLspFillStyle.StipplePattern.Builder

java.lang.Object
com.luciad.view.lightspeed.style.TLspFillStyle.StipplePattern.Builder
Enclosing class:
TLspFillStyle.StipplePattern

public static class TLspFillStyle.StipplePattern.Builder extends Object
A builder for stipple patterns.
Since:
2012.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Finishes building and returns the stipple pattern corresponding to the properties configured on this builder.
    drawLine(int aX1, int aY1, int aX2, int aY2)
    Draws a line in this stipple pattern from the given starting point to the given end point.
    drawOval(int aX, int aY, int aWidth, int aHeight)
    Draws an oval in this stipple pattern with the given top-left corner location, width and height The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
    drawPolygon(int[] aXPoints, int[] aYPoints, int aNPoints)
    Draws a polygon in this stipple pattern with the given point locations The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
    drawRect(int aX, int aY, int aWidth, int aHeight)
    Draws a rectangle in this stipple pattern with the given top left corner location, width and height The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
    fillOval(int aX, int aY, int aWidth, int aHeight)
    Draws a filled oval in this stipple pattern with the given top-left corner location, width and height The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
    fillPolygon(int[] aXPoints, int[] aYPoints, int aNPoints)
    Draws a filled polygon in this stipple pattern with the given point locations The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
    fillRect(int aX, int aY, int aWidth, int aHeight)
    Draws a filled rectangle in this stipple pattern with the given top left corner location, width and height The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
    setStipplePattern(byte[] aStipplePattern)
    Sets a new stipple pattern defined by the given byte array.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • setStipplePattern

      public TLspFillStyle.StipplePattern.Builder setStipplePattern(byte[] aStipplePattern)
      Sets a new stipple pattern defined by the given byte array.

      The given byte array must represent 32x32 grid of bits in row-major order. That is, the array should be of length 128 ( 32 bits * 32 bits = 1024 bits = 128 bytes), where each 4 bytes represent a row of the bit pattern (4 bytes = 32 bits).
      Parameters:
      aStipplePattern - the stipple pattern
      Returns:
      this builder
      Throws:
      IllegalArgumentException - if aStipplePattern == null || aStipplePattern.length != 128
    • drawLine

      public TLspFillStyle.StipplePattern.Builder drawLine(int aX1, int aY1, int aX2, int aY2)
      Draws a line in this stipple pattern from the given starting point to the given end point. The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31. The coordinate (0,0) is equal to the top-left corner.
      Parameters:
      aX1 - the x-coordinate of the starting point in the range [0..31]
      aY1 - the y-coordinate of the starting point in the range [0..31]
      aX2 - the x-coordinate of the end point
      aY2 - the y-coordinate of the end-point
      Returns:
      this builder
    • drawOval

      public TLspFillStyle.StipplePattern.Builder drawOval(int aX, int aY, int aWidth, int aHeight)
      Draws an oval in this stipple pattern with the given top-left corner location, width and height The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
      Parameters:
      aX - the x-coordinate of the top-left corner of the oval in the range [0..31]
      aY - the y-coordinate of the top-left corner of the oval in the range [0..31]
      aWidth - the width of the oval
      aHeight - the height of the oval
      Returns:
      this builder
    • fillOval

      public TLspFillStyle.StipplePattern.Builder fillOval(int aX, int aY, int aWidth, int aHeight)
      Draws a filled oval in this stipple pattern with the given top-left corner location, width and height The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
      Parameters:
      aX - the x-coordinate of the top-left corner of the oval in the range [0..31]
      aY - the y-coordinate of the top-left corner of the oval in the range [0..31]
      aWidth - the width of the oval in the range [1..32]
      aHeight - the height of the oval in the range [1..32]
      Returns:
      this builder
    • drawRect

      public TLspFillStyle.StipplePattern.Builder drawRect(int aX, int aY, int aWidth, int aHeight)
      Draws a rectangle in this stipple pattern with the given top left corner location, width and height The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
      Parameters:
      aX - the x-coordinate of the top-left corner of the rectangle in the range [0..31]
      aY - the y-coordinate of the top-left corner of the rectangle in the range [0..31]
      aWidth - the width of the rectangle in the range [1..32]
      aHeight - the height of the rectangle in the range [1..32]
      Returns:
      this builder
    • fillRect

      public TLspFillStyle.StipplePattern.Builder fillRect(int aX, int aY, int aWidth, int aHeight)
      Draws a filled rectangle in this stipple pattern with the given top left corner location, width and height The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
      Parameters:
      aX - the x-coordinate of the top-left corner of the rectangle in the range [0..31]
      aY - the y-coordinate of the top-left corner of the rectangle in the range [0..31]
      aWidth - the width of the rectangle in the range [1..32]
      aHeight - the height of the rectangle in the range [1..32]
      Returns:
      this builder
    • drawPolygon

      public TLspFillStyle.StipplePattern.Builder drawPolygon(int[] aXPoints, int[] aYPoints, int aNPoints)
      Draws a polygon in this stipple pattern with the given point locations The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
      Parameters:
      aXPoints - the x-coordinates of the points of the polygon in the range [0..31]
      aYPoints - the y-coordinates of the points of the polygon in the range [0..31]
      aNPoints - the number of points of the polygon
      Returns:
      this builder
    • fillPolygon

      public TLspFillStyle.StipplePattern.Builder fillPolygon(int[] aXPoints, int[] aYPoints, int aNPoints)
      Draws a filled polygon in this stipple pattern with the given point locations The coordinates are image coordinates of the stipple pattern, so should be in the range from 0 to and including 31.
      Parameters:
      aXPoints - the x-coordinates of the points of the polygon
      aYPoints - the y-coordinates of the points of the polygon
      aNPoints - the number of points of the polygon
      Returns:
      this builder
    • build

      Finishes building and returns the stipple pattern corresponding to the properties configured on this builder.
      Returns:
      A stipple pattern.