Methods Summary |
---|
public java.awt.image.RenderedImage | createDefaultRendering()
AffineTransform at = new AffineTransform();
RenderContext context = new RenderContext(at);
return createRendering(context);
|
public java.awt.image.RenderedImage | createRendering(java.awt.image.renderable.RenderContext renderContext)
Vector<RenderableImage> sources = getSources();
ParameterBlock rdParam = (ParameterBlock)paramBlock.clone();
if (sources != null) {
Vector<Object> rdSources = new Vector<Object>();
int i = 0;
while (i < sources.size()) {
RenderContext newContext = CRIF
.mapRenderContext(i, renderContext, paramBlock, this);
RenderedImage rdim = sources.elementAt(i).createRendering(newContext);
if (rdim != null) {
rdSources.addElement(rdim);
}
i++;
}
if (rdSources.size() > 0) {
rdParam.setSources(rdSources);
}
}
return CRIF.create(renderContext, rdParam);
|
public java.awt.image.RenderedImage | createScaledRendering(int w, int h, java.awt.RenderingHints hints)
if (w == 0 && h == 0) {
// awt.60=Width and Height mustn't be equal zero both
throw new IllegalArgumentException(Messages.getString("awt.60")); //$NON-NLS-1$
}
if (w == 0) {
w = Math.round(h * (getWidth() / getHeight()));
}
if (h == 0) {
h = Math.round(w * (getHeight() / getWidth()));
}
double sx = (double)w / getWidth();
double sy = (double)h / getHeight();
AffineTransform at = AffineTransform.getScaleInstance(sx, sy);
RenderContext context = new RenderContext(at, hints);
return createRendering(context);
|
public float | getHeight()
return height;
|
public float | getMinX()
return minX;
|
public float | getMinY()
return minY;
|
public java.awt.image.renderable.ParameterBlock | getParameterBlock()Gets the parameter block.
return paramBlock;
|
public java.lang.Object | getProperty(java.lang.String name)
return CRIF.getProperty(paramBlock, name);
|
public java.lang.String[] | getPropertyNames()
return CRIF.getPropertyNames();
|
public java.util.Vector | getSources()
if (paramBlock.getNumSources() == 0) {
return null;
}
Vector<RenderableImage> v = new Vector<RenderableImage>();
int i = 0;
while (i < paramBlock.getNumSources()) {
Object o = paramBlock.getSource(i);
if (o instanceof RenderableImage) {
v.addElement((RenderableImage)o);
}
i++;
}
return v;
|
public float | getWidth()
return width;
|
public boolean | isDynamic()
return CRIF.isDynamic();
|
public java.awt.image.renderable.ParameterBlock | setParameterBlock(java.awt.image.renderable.ParameterBlock paramBlock)Sets the parameter block.
ParameterBlock oldParam = this.paramBlock;
this.paramBlock = (ParameterBlock)paramBlock.clone();
return oldParam;
|