public XDDFGradientStop getGradientStop(int index) { if (props.isSetGsLst()) { return new XDDFGradientStop(props.getGsLst().getGsArray(index)); } else { return null; } }
final CTGradientStop[] gs = gradFill.getGsLst().getGsArray();
XSLFTheme theme, CTSchemeColor phClr) { @SuppressWarnings("deprecation") CTGradientStop[] gs = gradFill.getGsLst().getGsArray();
public XDDFGradientStop getGradientStop(int index) { if (props.isSetGsLst()) { return new XDDFGradientStop(props.getGsLst().getGsArray(index)); } else { return null; } }
double angle = gradFill.getLin().getAng() / 60000; @SuppressWarnings("deprecation") CTGradientStop[] gs = gradFill.getGsLst().getGsArray();
/** * gradients with type=shape are enot supported by Java graphics. * We approximate it with a radial gradient. */ private static Paint toRadialGradientPaint( CTGradientFillProperties gradFill, Rectangle2D anchor, XSLFTheme theme, CTSchemeColor phClr) { @SuppressWarnings("deprecation") CTGradientStop[] gs = gradFill.getGsLst().getGsArray(); Arrays.sort(gs, new Comparator<CTGradientStop>() { public int compare(CTGradientStop o1, CTGradientStop o2) { Integer pos1 = o1.getPos(); Integer pos2 = o2.getPos(); return pos1.compareTo(pos2); } }); gs[1].setPos(50000); CTGradientFillProperties g = CTGradientFillProperties.Factory.newInstance(); g.set(gradFill); g.getGsLst().setGsArray(new CTGradientStop[]{gs[0], gs[1]}); return createRadialGradientPaint(g, anchor, theme, phClr); }
final CTGradientStop[] gs = gradFill.getGsLst().getGsArray();