Class TextRectangle

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class TextRectangle
    extends Rectangle
    A rectangle adapted for working with text elements.
    • Field Detail

      • textBaseLineYCoordinate

        private float textBaseLineYCoordinate
        The y coordinate of the line on which the text is located.
    • Constructor Detail

      • TextRectangle

        public TextRectangle​(float x,
                             float y,
                             float width,
                             float height,
                             float textBaseLineYCoordinate)
        Create new instance of text rectangle.
        Parameters:
        x - the x coordinate of lower left point
        y - the y coordinate of lower left point
        width - the width value
        height - the height value
        textBaseLineYCoordinate - the y coordinate of the line on which the text is located.
    • Method Detail

      • getTextBaseLineRightPoint

        public Point getTextBaseLineRightPoint()
        Return the far right point of the rectangle with y on the baseline.
        Returns:
        the far right baseline point