Class OutlinedTile

  • All Implemented Interfaces:
    FlippablePageItem, PageItem, java.io.Serializable, java.lang.Cloneable

    public class OutlinedTile
    extends Tile
    A tile with a static outline. This class is used to instantiate tile set entries for tiles with outlines. It provides methods similar to OutlineStyle, but it does not actually implement that interface, so the outline cannot be configured through the StyleEditor.
    Since:
    3.0
    Author:
    Chris Jennings
    See Also:
    Serialized Form
    • Constructor Detail

      • OutlinedTile

        public OutlinedTile​(java.lang.String name,
                            java.lang.String identifier,
                            double ppi)
        Creates a new outlined tile.
        Parameters:
        name - the user-friendly tile name
        identifier - the identifier used to determine the image to display
        ppi - the tile image resolution, in pixels per inch
    • Method Detail

      • getOutlineColor

        public java.awt.Color getOutlineColor()
        Returns the color used to draw the outline.
        Returns:
        the outline color
      • setOutlineColor

        public void setOutlineColor​(java.awt.Color borderColor)
        Sets the color used to draw the outline.
        Parameters:
        borderColor - the outline color
      • getOutlineWidth

        public float getOutlineWidth()
        Returns the width, in points, of the outline.
        Returns:
        the outline line width
      • setOutlineWidth

        public void setOutlineWidth​(float borderWidth)
        Sets the color used to draw the outline.
      • getOutlineDashPattern

        public DashPattern getOutlineDashPattern()
        Returns the dash pattern used to draw the outline.
        Returns:
        the dash pattern for the outline
      • setOutlineDashPattern

        public void setOutlineDashPattern​(DashPattern pat)
        Sets the dash pattern used to draw the outline.
        Parameters:
        pat - the dash pattern type
      • getOutlineJoin

        public LineJoin getOutlineJoin()
        Returns the method used to join the line segments that make up the outline.
        Returns:
        the line joining method
      • setOutlineJoin

        public void setOutlineJoin​(LineJoin borderJoin)
        Sets the method used to join the line segments that make up the outline.
      • setOutlineCap

        public void setOutlineCap​(LineCap cap)
        Sets the line cap style used on outline ends.
        Parameters:
        cap - the line cap type
      • getOutlineCap

        public LineCap getOutlineCap()
        Returns the line cap style used on outline ends.
        Returns:
        the line cap style
      • paint

        public void paint​(java.awt.Graphics2D g,
                          RenderTarget target,
                          double renderResolutionHint)
        Description copied from interface: PageItem
        Paint this item at its current location. The graphics context will be scaled so that 1 unit represents 1 point. The resolution hint is a suggestion as to the resolution the item should be rendered at if it must be converted to a bitmap before being drawn. It may or may not represent the actual resolution of the output target.
        Specified by:
        paint in interface PageItem
        Overrides:
        paint in class Tile
        Parameters:
        g - the graphics context to paint to
        target - the type of destination being drawn to
        renderResolutionHint - a source resolution hint