/** * Apply the tint * * For a tint, the equation is luminance * %tint + (1-%tint). * (Note that 1-%tint is equal to the lumOff value in DrawingML.) */ private static void applyTint(double[] hsl, ColorStyle fc) { int tint = fc.getTint(); if (tint == -1) { return; } // see 18.8.19 fgColor (Foreground Color) double tintPct = tint / 100000.; hsl[2] = hsl[2]*(1.-tintPct) + (100.-100.*(1.-tintPct)); }
@Override public int getTint() { return scale(orig.getTint(), PaintModifier.LIGHTEN_LESS, PaintModifier.LIGHTEN); }
/** * Apply the tint * * For a tint, the equation is luminance * %tint + (1-%tint). * (Note that 1-%tint is equal to the lumOff value in DrawingML.) */ private static void applyTint(double[] hsl, ColorStyle fc) { int tint = fc.getTint(); if (tint == -1) { return; } // see 18.8.19 fgColor (Foreground Color) double tintPct = tint / 100000.; hsl[2] = hsl[2]*(1.-tintPct) + (100.-100.*(1.-tintPct)); }
@Override public int getTint() { return scale(orig.getTint(), PaintModifier.LIGHTEN_LESS, PaintModifier.LIGHTEN); }