protected Property createShading(int fgColor, int bgColor, int pctFg) { CTShd shd = null; int resColor = UnitsOfMeasurement.combineColors(fgColor, bgColor, pctFg); shd = Context.getWmlObjectFactory().createCTShd(); shd.setVal(STShd.CLEAR); shd.setFill(calcHexColor(resColor)); return new Shading(shd); }
public PShading(CSSValue value) { CTShd shd = Context.getWmlObjectFactory().createCTShd();
public RShading(CSSValue value) { CTShd shd = Context.getWmlObjectFactory().createCTShd();
protected void appendNoneBordersAndShading(List<Property> tableProperties) { CTBorder ctBrdr = null; CTShd shd = Context.getWmlObjectFactory().createCTShd(); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderLeft(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderRight(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderTop(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderBottom(ctBrdr)); shd.setColor("auto"); shd.setFill("auto"); shd.setVal(STShd.CLEAR); tableProperties.add(new Shading(shd)); }
public Shading(CSSValue value) { CTShd shd = Context.getWmlObjectFactory().createCTShd(); // PrimitiveType 25 -> RGBCOLOR short ignored = 1; CSSPrimitiveValue cssPrimitiveValue = (CSSPrimitiveValue)value; float fRed = cssPrimitiveValue.getRGBColorValue().getRed().getFloatValue(ignored); float fGreen = cssPrimitiveValue.getRGBColorValue().getGreen().getFloatValue(ignored); float fBlue = cssPrimitiveValue.getRGBColorValue().getBlue().getFloatValue(ignored); shd.setFill(UnitsOfMeasurement.rgbTripleToHex(fRed, fGreen, fBlue) ); this.setObject( shd ); }
public static CTShd apply(CTShd source, CTShd destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTShd(); destination.setColor(apply(source.getColor(), destination.getColor())); destination.setFill(apply(source.getFill(), destination.getFill())); destination.setVal(apply(source.getVal(), destination.getVal())); destination.setThemeTint(apply(source.getThemeTint(), destination.getThemeTint())); destination.setThemeShade(apply(source.getThemeShade(), destination.getThemeShade())); destination.setThemeFillTint(apply(source.getThemeFillTint(), destination.getThemeFillTint())); destination.setThemeFillShade(apply(source.getThemeFillShade(), destination.getThemeFillShade())); destination.setThemeColor(source.getThemeColor()); //enum destination.setThemeFill(source.getThemeFill()); //enum } return destination; }
public CTShd getCopy(CTShd copy, boolean whenNull) { if (copy != null) { CTShd result = myFactory.createCTShd(); result.setVal(copy.getVal()); result.setColor(copy.getColor()); result.setThemeColor(copy.getThemeColor()); result.setThemeTint(copy.getThemeTint()); result.setThemeShade(copy.getThemeShade()); result.setFill(copy.getFill()); result.setThemeFill(copy.getThemeFill()); result.setThemeFillTint(copy.getThemeFillTint()); result.setThemeFillShade(copy.getThemeFillShade()); return result; } if (whenNull) { return myFactory.createCTShd(); } return null; }
protected Property createShading(int fgColor, int bgColor, int pctFg) { CTShd shd = null; int resColor = UnitsOfMeasurement.combineColors(fgColor, bgColor, pctFg); shd = Context.getWmlObjectFactory().createCTShd(); shd.setVal(STShd.CLEAR); shd.setFill(calcHexColor(resColor)); return new Shading(shd); }
public PShading(CSSValue value) { CTShd shd = Context.getWmlObjectFactory().createCTShd();
public RShading(CSSValue value) { CTShd shd = Context.getWmlObjectFactory().createCTShd();
protected void appendNoneBordersAndShading(List<Property> tableProperties) { CTBorder ctBrdr = null; CTShd shd = Context.getWmlObjectFactory().createCTShd(); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderLeft(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderRight(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderTop(ctBrdr)); ctBrdr = Context.getWmlObjectFactory().createCTBorder(); ctBrdr.setVal(STBorder.NONE); tableProperties.add(new BorderBottom(ctBrdr)); shd.setColor("auto"); shd.setFill("auto"); shd.setVal(STShd.CLEAR); tableProperties.add(new Shading(shd)); }
public Shading(CSSValue value) { CTShd shd = Context.getWmlObjectFactory().createCTShd(); // PrimitiveType 25 -> RGBCOLOR short ignored = 1; CSSPrimitiveValue cssPrimitiveValue = (CSSPrimitiveValue)value; float fRed = cssPrimitiveValue.getRGBColorValue().getRed().getFloatValue(ignored); float fGreen = cssPrimitiveValue.getRGBColorValue().getGreen().getFloatValue(ignored); float fBlue = cssPrimitiveValue.getRGBColorValue().getBlue().getFloatValue(ignored); shd.setFill(UnitsOfMeasurement.rgbTripleToHex(fRed, fGreen, fBlue) ); this.setObject( shd ); }
CTShd shd = Context.getWmlObjectFactory().createCTShd(); shd.setFill( UnitsOfMeasurement.rgbTripleToHex(rgbResult.getRed(), rgbResult.getGreen(), rgbResult.getBlue()) );
public static CTShd apply(CTShd source, CTShd destination) { if (!isEmpty(source)) { if (destination == null) destination = Context.getWmlObjectFactory().createCTShd(); destination.setColor(apply(source.getColor(), destination.getColor())); destination.setFill(apply(source.getFill(), destination.getFill())); destination.setVal(apply(source.getVal(), destination.getVal())); destination.setThemeTint(apply(source.getThemeTint(), destination.getThemeTint())); destination.setThemeShade(apply(source.getThemeShade(), destination.getThemeShade())); destination.setThemeFillTint(apply(source.getThemeFillTint(), destination.getThemeFillTint())); destination.setThemeFillShade(apply(source.getThemeFillShade(), destination.getThemeFillShade())); destination.setThemeColor(source.getThemeColor()); //enum destination.setThemeFill(source.getThemeFill()); //enum } return destination; }