g.setColor(Random.color()); if (1 < maxLineWidth) { int width = N.randInt(1, maxLineWidth + 1);
g.setColor(Random.color()); if (1 < maxLineWidth) { int width = N.randInt(1, maxLineWidth + 1);
public static void main(String[] args) { DefaultImageRender r = new DefaultImageRender(); Img.source(randomPixels(200, 70, Color.WHITE)) .text("Hello World") .color(Img.Random.darkColor()) .makeNoise() .setMaxLines(7) .setMaxLineWidth(3) .pipeline(r.optionalA) .writeTo("/tmp/1/x.png"); Img.source(randomPixels(200, 70, Color.WHITE)) .text("Hello World") .color(Img.Random.darkColor()) .makeNoise() .setMaxLines(7) .setMaxLineWidth(3) .pipeline(r.optionalB) .writeTo("/tmp/1/y.png"); } }
public static void main(String[] args) { DefaultImageRender r = new DefaultImageRender(); Img.source(randomPixels(200, 70, Color.WHITE)) .text("Hello World") .color(Img.Random.darkColor()) .makeNoise() .setMaxLines(7) .setMaxLineWidth(3) .pipeline(r.optionalA) .writeTo("/tmp/1/x.png"); Img.source(randomPixels(200, 70, Color.WHITE)) .text("Hello World") .color(Img.Random.darkColor()) .makeNoise() .setMaxLines(7) .setMaxLineWidth(3) .pipeline(r.optionalB) .writeTo("/tmp/1/y.png"); } }
public static Color randomDarkGreenColor() { return randomColor(0, 85, 85, 170, 0, 85); }
public static Color randomLightGreenColor() { return randomColor(85, 170, 170, 255, 85, 170); }
public static Color darkGrayColor() { return randomGrayColor(0, 85); }
public static Color randomLightGreenColor() { return randomColor(85, 170, 170, 255, 85, 170); }
public static Color randomDarkRedColor() { return randomColor(85, 170, 0, 85, 0, 85); }
public static Color moderateGrayColor() { return randomGrayColor(85, 170); }
public static Color lightGrayColor() { return randomGrayColor(170, 255); }
public static Color randomModerateGreenColor() { return randomColor(0, 85, 170, 255, 0, 85); }
public static Color randomLightRedColor() { return randomColor(170, 255, 85, 170, 85, 170); }
public static Color moderateGrayColor() { return randomGrayColor(85, 170); }
public static Color randomDarkBlueColor() { return randomColor(0, 85, 0, 85, 85, 170); }
public static Color moderateColor() { return randomColor(85, 170, 85, 170, 85, 170); }
public static Color darkColor() { return randomColor(0, 85, 0, 85, 0, 85); }
public static Color lightGrayColor() { return randomGrayColor(170, 255); }
public static Color randomDarkBlueColor() { return randomColor(0, 85, 0, 85, 85, 170); }
public static Color randomDarkGreenColor() { return randomColor(0, 85, 85, 170, 0, 85); }