Class GraphicStyle2D

Object
Style
Style2D
GraphicStyle2D
All Implemented Interfaces:
Cloneable, PointStyle2D

public class GraphicStyle2D extends Style2D implements PointStyle2D
A style class used to depict a point, polygon centroid or line with a small graphic icon
Author:
Andrea Aime
  • Constructor Details

    • GraphicStyle2D

      public GraphicStyle2D(BufferedImage image, float rotation)
      Creates a new GraphicStyle2D object.
      Parameters:
      image - The image that will be used to depict the centroid/point/...
      rotation - The image rotation
    • GraphicStyle2D

      public GraphicStyle2D(BufferedImage image, float rotation, int border)
    • GraphicStyle2D

      public GraphicStyle2D(BufferedImage image, int border)
  • Method Details

    • getImage

      public BufferedImage getImage()
    • getRotation

      public float getRotation()
      The graphic rotation in radians.
      Specified by:
      getRotation in interface PointStyle2D
      Returns:
      graphic rotation in radians
    • setImage

      public void setImage(BufferedImage image)
      Parameters:
      image -
    • setRotation

      public void setRotation(float radians)
      Graphic rotation in radians
      Specified by:
      setRotation in interface PointStyle2D
      Parameters:
      radians - graphic rotation
    • getBorder

      public int getBorder()
      The actual image size might have been extended with an extra border (usually of one pixel) to preserve antialiasing pixels
    • setBorder

      public void setBorder(int border)
    • getDisplacementX

      public float getDisplacementX()
      Description copied from interface: PointStyle2D
      The point symbol x displacement
      Specified by:
      getDisplacementX in interface PointStyle2D
    • setDisplacementX

      public void setDisplacementX(float displacementX)
      Description copied from interface: PointStyle2D
      Sets the point symbol x displacement
      Specified by:
      setDisplacementX in interface PointStyle2D
    • getDisplacementY

      public float getDisplacementY()
      Description copied from interface: PointStyle2D
      The point symbol y displacement
      Specified by:
      getDisplacementY in interface PointStyle2D
    • setDisplacementY

      public void setDisplacementY(float displacementY)
      Description copied from interface: PointStyle2D
      Sets the point symbol y displacement
      Specified by:
      setDisplacementY in interface PointStyle2D
    • getAnchorPointX

      public float getAnchorPointX()
      Description copied from interface: PointStyle2D
      The point symbol x anchor, between 0 and 1, defaults to 0.5
      Specified by:
      getAnchorPointX in interface PointStyle2D
    • setAnchorPointX

      public void setAnchorPointX(float anchorPointX)
      Description copied from interface: PointStyle2D
      Sets the point symbol x anchor, between 0 and 1
      Specified by:
      setAnchorPointX in interface PointStyle2D
    • getAnchorPointY

      public float getAnchorPointY()
      Description copied from interface: PointStyle2D
      The point symbol y anchor, between 0 and 1, defaults to 0.5
      Specified by:
      getAnchorPointY in interface PointStyle2D
    • setAnchorPointY

      public void setAnchorPointY(float anchorPointY)
      Description copied from interface: PointStyle2D
      Sets the point symbol y anchor, between 0 and 1
      Specified by:
      setAnchorPointY in interface PointStyle2D
    • getComposite

      public Composite getComposite()
      Description copied from interface: PointStyle2D
      Returns the composite for this point symbol
      Specified by:
      getComposite in interface PointStyle2D
    • setComposite

      public void setComposite(Composite composite)
      Description copied from interface: PointStyle2D
      Sets the composite for this point symbol
      Specified by:
      setComposite in interface PointStyle2D