This commit is contained in:
shimingxy 2024-11-18 16:08:22 +08:00
parent 05e089358a
commit a61cfef88a
3 changed files with 4 additions and 2 deletions

View File

@ -38,6 +38,9 @@ import com.google.code.kaptcha.util.Configurable;
public class RandomColorWordRenderer extends Configurable implements WordRenderer
{
ConfigHelper configHelper = new ConfigHelper();
Random random = new SecureRandom();
/**
* Renders a word to an image.
*
@ -69,7 +72,6 @@ public class RandomColorWordRenderer extends Configurable implements WordRendere
g2D.setRenderingHints(hints);
FontRenderContext frc = g2D.getFontRenderContext();
Random random = new SecureRandom();
int startPosY = (height - fontSize) / 5 + fontSize;