Class ShapeProperties

java.lang.Object
journeymap.api.v2.client.model.ShapeProperties

public class ShapeProperties extends Object
Properties defining the display of a shape.

Setters use the Builder pattern so they can be chained.

  • Constructor Details

    • ShapeProperties

      public ShapeProperties()
  • Method Details

    • getStrokeColor

      public int getStrokeColor()
      Gets the stroke color.
      Returns:
      rgb strokeColor
    • setStrokeColor

      public ShapeProperties setStrokeColor(int strokeColor)
      Sets the stroke Color (rgb). Range is 0x000000 - 0xffffff.
      Parameters:
      strokeColor - rgb
      Returns:
      this
    • getFillColor

      public int getFillColor()
      Gets stroke Color. Range is 0x000000 - 0xffffff.
      Returns:
      the fill color
    • setFillColor

      public ShapeProperties setFillColor(int fillColor)
      Sets fill color. Range is 0x000000 - 0xffffff.
      Parameters:
      fillColor - the fill color
      Returns:
      this
    • getStrokeOpacity

      public float getStrokeOpacity()
      Gets stroke opacity. Range is 0f - 1f.
      Returns:
      the stroke opacity
    • setStrokeOpacity

      public ShapeProperties setStrokeOpacity(float strokeOpacity)
      Sets stroke opacity. Range is 0f - 1f.
      Parameters:
      strokeOpacity - the stroke opacity
      Returns:
      this
    • getFillOpacity

      public float getFillOpacity()
      Gets fill opacity. Range is 0f - 1f.
      Returns:
      the fill opacity
    • setFillOpacity

      public ShapeProperties setFillOpacity(float fillOpacity)
      Sets fillOpacity. Range is 0f - 1f.
      Parameters:
      fillOpacity - the fillOpacity
      Returns:
      this
    • getStrokeWidth

      public float getStrokeWidth()
      Gets the stroke width.
      Returns:
      width
    • setStrokeWidth

      public ShapeProperties setStrokeWidth(float strokeWidth)
      Sets the stroke width.
      Parameters:
      strokeWidth - width
      Returns:
      this
    • getImage

      @Nullable public @Nullable com.mojang.blaze3d.platform.NativeImage getImage()
      Gets the image, if there is one.
      Returns:
      the image
    • setImage

      public ShapeProperties setImage(com.mojang.blaze3d.platform.NativeImage image)
      Sets the image.
      Parameters:
      image - the image
      Returns:
      this
    • getImageLocation

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation getImageLocation()
      Gets the image location, if there is one.
      Returns:
      the location
    • setImageLocation

      public ShapeProperties setImageLocation(net.minecraft.resources.ResourceLocation imageLocation)
      Sets the image location.
      Parameters:
      imageLocation - the image location
      Returns:
      this
    • getTexturePositionX

      public double getTexturePositionX()
      Gets texture position x.
      Returns:
      the texture position x
    • setTexturePositionX

      public ShapeProperties setTexturePositionX(double texturePositionX)
      Sets texture position x.
      Parameters:
      texturePositionX - the texture position x
      Returns:
      this
    • getTexturePositionY

      public double getTexturePositionY()
      Gets texture position y.
      Returns:
      the texture position y
    • setTexturePositionY

      public ShapeProperties setTexturePositionY(double texturePositionY)
      Sets texture position y.
      Parameters:
      texturePositionY - the texture position y
      Returns:
      this
    • getTextureScaleX

      public double getTextureScaleX()
      Gets texture scale x.
      Returns:
      the texture scale x
    • setTextureScaleX

      public ShapeProperties setTextureScaleX(double textureScaleX)
      Sets texture scale x.
      Parameters:
      textureScaleX - the texture scale x
      Returns:
      this
    • getTextureScaleY

      public double getTextureScaleY()
      Gets texture scale y.
      Returns:
      the texture scale y
    • setTextureScaleY

      public ShapeProperties setTextureScaleY(double textureScaleY)
      Sets texture scale y.
      Parameters:
      textureScaleY - the texture scale y
      Returns:
      this
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object