IdenticonRenderer
public class NineBlockIdenticonRenderer2 extends java.lang.Object implements IdenticonRenderer
Current implementation uses only the lower 32 bits of identicon code.
コンストラクタ | 説明 |
---|---|
NineBlockIdenticonRenderer2() |
Constructor.
|
修飾子とタイプ | メソッド | 説明 |
---|---|---|
java.awt.Color |
getBackgroundColor() |
|
float |
getPatchSize() |
Returns the size in pixels at which each patch will be rendered before
they are scaled down to requested identicon size.
|
java.awt.image.BufferedImage |
render(int code,
int size) |
Returns rendered identicon image for given identicon code.
|
java.awt.image.BufferedImage |
render(java.math.BigInteger code,
int size) |
Returns rendered identicon image for given identicon code.
|
protected java.awt.image.BufferedImage |
renderQuilt(int code,
int size) |
|
void |
setBackgroundColor(java.awt.Color backgroundColor) |
|
void |
setPatchSize(float size) |
Set the size in pixels at which each patch will be rendered before they
are scaled down to requested identicon size.
|
public float getPatchSize()
public void setPatchSize(float size)
size
- patch size in pixelspublic java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color backgroundColor)
public java.awt.image.BufferedImage render(java.math.BigInteger code, int size)
IdenticonRenderer
render
インタフェース内 IdenticonRenderer
code
- identicon codesize
- image sizepublic java.awt.image.BufferedImage render(int code, int size)
Size of the returned identicon image is determined by patchSize set using
setPatchSize(float)
. Since a 9-block identicon consists of 3x3 patches,
width and height will be 3 times the patch size.
render
インタフェース内 IdenticonRenderer
code
- identicon codesize
- image sizeprotected java.awt.image.BufferedImage renderQuilt(int code, int size)