java.lang.Object
org.miaixz.bus.extra.image.ImageText
- All Implemented Interfaces:
Serializable
Represents text to be displayed, used for storing text information for drawing on an image, including content, font,
size, position, and transparency.
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanfloatgetAlpha()Gets the transparency.getColor()Gets the text color.getFont()Gets the font.getPoint()Gets the 2D coordinate point.Gets the text content.inthashCode()static ImageTextBuilds an ImageText object.voidsetAlpha(float alpha) Sets the transparency.voidSets the text color.voidSets the font.voidSets the 2D coordinate point.voidsetPressText(String pressText) Sets the text content.toString()
-
Constructor Details
-
ImageText
Constructor.- Parameters:
text- The text content.color- The color of the text.font- The font for displaying the text.point- The top-left starting position.alpha- The transparency.
-
-
Method Details
-
of
Builds an ImageText object.- Parameters:
text- The text content.color- The color of the text.font- The font for displaying the text.point- The top-left starting position.alpha- The transparency.- Returns:
- An ImageText object.
-
getPressText
Gets the text content.- Returns:
- The text content.
-
setPressText
Sets the text content.- Parameters:
pressText- The text content.
-
getColor
Gets the text color.- Returns:
- The text color.
-
setColor
Sets the text color.- Parameters:
color- The text color.
-
getFont
Gets the font.- Returns:
- The font.
-
setFont
Sets the font.- Parameters:
font- The font.
-
getPoint
Gets the 2D coordinate point.- Returns:
- The 2D coordinate point.
-
setPoint
Sets the 2D coordinate point.- Parameters:
point- The 2D coordinate point.
-
getAlpha
public float getAlpha()Gets the transparency.- Returns:
- The transparency.
-
setAlpha
public void setAlpha(float alpha) Sets the transparency.- Parameters:
alpha- The transparency.
-
equals
-
hashCode
public int hashCode() -
toString
-