public class NineBlockIdenticonRenderer2 extends Object implements IdenticonRenderer
Current implementation uses only the lower 32 bits of identicon code.
| 构造器和说明 |
|---|
NineBlockIdenticonRenderer2()
Constructor.
|
| 限定符和类型 | 方法和说明 |
|---|---|
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.
|
BufferedImage |
render(BigInteger code,
int size)
Returns rendered identicon image for given identicon code.
|
BufferedImage |
render(int code,
int size)
Returns rendered identicon image for given identicon code.
|
protected BufferedImage |
renderQuilt(int code,
int size) |
void |
setBackgroundColor(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 Color getBackgroundColor()
public void setBackgroundColor(Color backgroundColor)
public BufferedImage render(BigInteger code, int size)
IdenticonRendererrender 在接口中 IdenticonRenderercode - identicon codesize - image sizepublic BufferedImage render(int code, int size)
Size of the returned identicon image is determined by patchSize set using
setPatchSize. Since a 9-block identicon consists of 3x3 patches,
width and height will be 3 times the patch size.
render 在接口中 IdenticonRenderercode - identicon codesize - image sizeprotected BufferedImage renderQuilt(int code, int size)
Copyright © 2020. All rights reserved.