mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-16 05:20:42 +08:00
代码优化
This commit is contained in:
@@ -48,6 +48,7 @@ public class LightNoise extends Configurable implements NoiseProducer
|
||||
* @param factorThree
|
||||
* @param factorFour
|
||||
*/
|
||||
@Override
|
||||
public void makeNoise(BufferedImage image, float factorOne,
|
||||
float factorTwo, float factorThree, float factorFour)
|
||||
{
|
||||
@@ -100,8 +101,9 @@ public class LightNoise extends Configurable implements NoiseProducer
|
||||
// for the maximum 3 point change the stroke and direction
|
||||
for (i = 0; i < pts.length - 1; i++)
|
||||
{
|
||||
if (i < 3)
|
||||
if (i < 3) {
|
||||
graph.setStroke(new BasicStroke(0.7f * (2 - i)));
|
||||
}
|
||||
graph.drawLine((int) pts[i].getX(), (int) pts[i].getY(),
|
||||
(int) pts[i + 1].getX(), (int) pts[i + 1].getY());
|
||||
}
|
||||
|
||||
@@ -37,6 +37,7 @@ public class Ripple extends Configurable implements GimpyEngine
|
||||
* @param baseImage the base image
|
||||
* @return the distorted image
|
||||
*/
|
||||
@Override
|
||||
public BufferedImage getDistortedImage(BufferedImage baseImage)
|
||||
{
|
||||
NoiseProducer noiseProducer = getConfig().getNoiseImpl();
|
||||
|
||||
@@ -49,6 +49,7 @@ public class RandomColorWordRenderer extends Configurable implements WordRendere
|
||||
* The height of the image to be created.
|
||||
* @return The BufferedImage created from the word.
|
||||
*/
|
||||
@Override
|
||||
public BufferedImage renderWord(String word, int width, int height)
|
||||
{
|
||||
int fontSize = getConfig().getTextProducerFontSize();
|
||||
|
||||
Reference in New Issue
Block a user