Package com.xxl.tool.captcha
Class CaptchaTool
java.lang.Object
com.xxl.tool.captcha.CaptchaTool
captcha tool
- Author:
- xuxueli 2025-09-13
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classarithmetic text creatorstatic classdefault text creatorstatic interfaceimage distorted enginestatic class鱼眼效果static classnone distorted enginestatic class波纹效果static class阴影效果static interfacetext creatorstatic classtext resultstatic class水波纹效果 -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertNotNull(Object object, String errorMessage) static CaptchaToolbuild()create captcha toolcreateImage(CaptchaTool.TextResult textResult) create captcha imagecreate captcha textgetFonts()getWidth()setBackgroundColorFrom(Color backgroundColorFrom) setBackgroundColorTo(Color backgroundColorTo) setBorderColor(Color borderColor) setBorderThickness(Integer borderThickness) setCharSpace(Integer charSpace) setDistortedEngines(List<CaptchaTool.DistortedEngine> distortedEngines) setFontSize(Integer fontSize) setIsBorderDrawn(Boolean isBorderDrawn) setNoiseColor(Color noiseColor) setTextCreator(CaptchaTool.TextCreator textCreator)
-
Field Details
-
TEXT_NUMBER
- See Also:
-
TEXT_LOWERCASE
- See Also:
-
TEXT_NUMBER_AND_LOWERCASE
- See Also:
-
-
Constructor Details
-
CaptchaTool
public CaptchaTool()
-
-
Method Details
-
getTextCreator
-
setTextCreator
-
getWidth
-
setWidth
-
getHeight
-
setHeight
-
getColors
-
setColors
-
getFontSize
-
setFontSize
-
getFonts
-
setFonts
-
getCharSpace
-
setCharSpace
-
getBackgroundColorFrom
-
setBackgroundColorFrom
-
getBackgroundColorTo
-
setBackgroundColorTo
-
getIsBorderDrawn
-
setIsBorderDrawn
-
getBorderColor
-
setBorderColor
-
getBorderThickness
-
setBorderThickness
-
getNoiseColor
-
setNoiseColor
-
getDistortedEngines
-
setDistortedEngines
-
build
create captcha tool- Returns:
- CaptchaTool
-
createText
create captcha text- Returns:
- TextResult
-
assertNotNull
-
createImage
create captcha image- Returns:
- BufferedImage
-