org.hd.d.pg2k.webSvr.bgImg
Class BgImageUtils.Sine2DColourImageGen
java.lang.Object
org.hd.d.pg2k.webSvr.bgImg.BgImageUtils.Sine2DColourImageGen
- All Implemented Interfaces:
- BgImageUtils.DynImageGen
- Enclosing class:
- BgImageUtils
public static final class BgImageUtils.Sine2DColourImageGen
- extends java.lang.Object
- implements BgImageUtils.DynImageGen
Makes 2D sine-plus-noise colour image.
This is slowly varying, and light,
so should be easy to read dark text against.
This may revert to mono dependending on the seed.
|
Method Summary |
java.awt.image.BufferedImage |
createImage(int seed)
Generate 2D sine-based colour with each colour distributed between max and min Y. |
private static int |
getRndCycles(java.util.Random pRnd)
Chose a number of cycles for the background pattern across the image; strictly positive. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BgImageUtils.Sine2DColourImageGen
public BgImageUtils.Sine2DColourImageGen()
createImage
public java.awt.image.BufferedImage createImage(int seed)
- Generate 2D sine-based colour with each colour distributed between max and min Y.
The image parameters are mostly entirely derived from the seed.
- Specified by:
createImage in interface BgImageUtils.DynImageGen
getRndCycles
private static int getRndCycles(java.util.Random pRnd)
- Chose a number of cycles for the background pattern across the image; strictly positive.
The result is always (much) less than the number of pixels,
and always at least 1.
- Parameters:
pRnd - the pseudo-random (repeatable) source; never null
Copyright (c) 1996-2009, Damon Hart-Davis. All rights reserved.