public int getSpreadMethod() { if (spreadMethod.isSet()) { return spreadMethod.getIntValue(); } if (stopRef.isSet()) { Gradient grad = (Gradient) stopRef.getElement(); // diagram.getUniverse().getElement(stopRef); return grad.getSpreadMethod(); } return spreadMethod.getIntValue(); }
public int getGradientUnits() { if (gradientUnits.isSet()) { return gradientUnits.getIntValue(); } if (stopRef.isSet()) { Gradient grad = (Gradient) stopRef.getElement(); // diagram.getUniverse().getElement(stopRef); return grad.getGradientUnits(); } return gradientUnits.getIntValue(); }
/** Creates a new instance of Gradient */ public Gradient() { spreadMethod.setDefaultSource(new IntDefaultConstant(SM_PAD)); gradientUnits.setDefaultSource(new IntDefaultConstant(GU_OBJECT_BOUNDING_BOX)); }