Methods Summary |
---|
protected com.sun.perseus.j2d.PaintDef | computePaint()Computes the paint in user space on use.
if (computedPaint == null) {
buildGradientColorMap();
computedPaint =
new RadialGradientPaintDef(cx,
cy,
cx,
cy,
r,
lastColorMapFractions,
lastColorMapRGBA,
RadialGradientPaintDef.CYCLE_NONE,
isObjectBBox,
transform);
}
return computedPaint;
|
TraitAnim | createTraitAnimImpl(java.lang.String traitName)RadialGradient handles cx, cy, r traits as
FloatTraitAnims.
if (SVGConstants.SVG_CX_ATTRIBUTE == traitName
||
SVGConstants.SVG_R_ATTRIBUTE == traitName
||
SVGConstants.SVG_CY_ATTRIBUTE == traitName) {
return new FloatTraitAnim(this, traitName, TRAIT_TYPE_FLOAT);
} else {
return super.createTraitAnimImpl(traitName);
}
|
public float | getCx()
return cx;
|
public float | getCy()
return cy;
|
float | getFloatTraitImpl(java.lang.String name)
if (SVGConstants.SVG_CX_ATTRIBUTE == name) {
return cx;
} else if (SVGConstants.SVG_CY_ATTRIBUTE == name) {
return cy;
} else if (SVGConstants.SVG_R_ATTRIBUTE == name) {
return r;
} else {
return super.getFloatTraitImpl(name);
}
|
public java.lang.String | getLocalName()
return SVGConstants.SVG_RADIAL_GRADIENT_TAG;
|
public float | getR()
return r;
|
public java.lang.String | getTraitImpl(java.lang.String name)
if (SVGConstants.SVG_CX_ATTRIBUTE == name) {
return Float.toString(cx);
} else if (SVGConstants.SVG_CY_ATTRIBUTE == name) {
return Float.toString(cy);
} else if (SVGConstants.SVG_R_ATTRIBUTE == name) {
return Float.toString(r);
} else {
return super.getTraitImpl(name);
}
|
public ElementNode | newInstance(DocumentNode doc)Used by DocumentNode to create a new instance from
a prototype Rect .
return new RadialGradient(doc);
|
public void | setCx(float newCX)Sets the cx property.
if (newCX == cx) {
return;
}
this.cx = newCX;
onPaintChange();
|
public void | setCy(float newCY)Sets the cy property.
if (newCY == cy) {
return;
}
this.cy = newCY;
onPaintChange();
|
void | setFloatArrayTrait(java.lang.String name, float[][] value)Set the trait value as float array.
if (SVGConstants.SVG_CX_ATTRIBUTE == name) {
setCx(value[0][0]);
} else if (SVGConstants.SVG_CY_ATTRIBUTE == name) {
setCy(value[0][0]);
} else if (SVGConstants.SVG_R_ATTRIBUTE == name) {
setR(value[0][0]);
} else {
super.setFloatArrayTrait(name, value);
}
|
public void | setFloatTraitImpl(java.lang.String name, float value)Set the trait value as float.
Supported float traits: stroke-width, stroke-miterlimit,
stroke-dashoffset, fill-opacity, stroke-opacity.
if (SVGConstants.SVG_CX_ATTRIBUTE == name) {
setCx(value);
} else if (SVGConstants.SVG_CY_ATTRIBUTE == name) {
setCy(value);
} else if (SVGConstants.SVG_R_ATTRIBUTE == name) {
checkPositive(name, value);
setR(value);
} else {
super.setFloatTraitImpl(name, value);
}
|
public void | setR(float newR)Sets the r property.
if (newR == r) {
return;
}
if (r < 0) {
throw new IllegalArgumentException();
}
this.r = newR;
onPaintChange();
|
public void | setTraitImpl(java.lang.String name, java.lang.String value)Supported traits: stroke-width, stroke-miterlimit, stroke-dashoffset,
fill-rule, stroke-linejoin, stroke-linecap, display, visibility,
color, fill, stroke, fill-opacity, stroke-opacity, stroke-dasharray
if (SVGConstants.SVG_CX_ATTRIBUTE == name) {
setCx(parseFloatTrait(name, value));
} else if (SVGConstants.SVG_CY_ATTRIBUTE == name) {
setCy(parseFloatTrait(name, value));
} else if (SVGConstants.SVG_R_ATTRIBUTE == name) {
setR(parsePositiveFloatTrait(name, value));
} else {
super.setTraitImpl(name, value);
}
|
boolean | supportsTrait(java.lang.String traitName)
if (SVGConstants.SVG_CX_ATTRIBUTE == traitName
||
SVGConstants.SVG_R_ATTRIBUTE == traitName
||
SVGConstants.SVG_CY_ATTRIBUTE == traitName) {
return true;
} else {
return super.supportsTrait(traitName);
}
|
java.lang.String | toStringTrait(java.lang.String name, float[][] value)
if (SVGConstants.SVG_CX_ATTRIBUTE == name
||
SVGConstants.SVG_CY_ATTRIBUTE == name
||
SVGConstants.SVG_R_ATTRIBUTE == name) {
return Float.toString(value[0][0]);
} else {
return super.toStringTrait(name, value);
}
|
public float[][] | validateFloatArrayTrait(java.lang.String traitName, java.lang.String value, java.lang.String reqNamespaceURI, java.lang.String reqLocalName, java.lang.String reqTraitNamespace, java.lang.String reqTraitName)Validates the input trait value.
if (SVGConstants.SVG_CX_ATTRIBUTE == traitName
||
SVGConstants.SVG_CY_ATTRIBUTE == traitName) {
return new float[][] {{parseFloatTrait(traitName, value)}};
} else if (SVGConstants.SVG_R_ATTRIBUTE == traitName) {
return new float[][] {{parsePositiveFloatTrait(traitName, value)}};
} else {
return super.validateFloatArrayTrait(traitName,
value,
reqNamespaceURI,
reqLocalName,
reqTraitNamespace,
reqTraitName);
}
|