Adds the removed functions back in, but rewrites their implementation.
@@ -241,6 +241,21 @@ public class AsciiCharacter {
updateCacheHash();
}
+ /**
+ * Shades the background and foreground color by some factor, where a higher
+ * factor results in a darker shade.
+ *
+ * @param tintFactor
+ * The factor.
+ *
+ * Values should range from 0.0 to 1.0.
+ */
+ public void tintBackgroundAndForegroundColor(final double tintFactor) {
+ backgroundColor = ColorFunctions.tint(backgroundColor, tintFactor);
+ foregroundColor = ColorFunctions.tint(foregroundColor, tintFactor);
+ updateCacheHash();
+ }
+
/**
* Tints the background color by some factor, where a higher factor results
* in a lighter tint.
@@ -269,6 +284,21 @@ public class AsciiCharacter {
updateCacheHash();
}
+ /**
+ * Tints the background and foreground color by some factor, where a higher
+ * factor results in a lighter tint.
+ *
+ * @param shadeFactor
+ * The factor.
+ *
+ * Values should range from 0.0 to 1.0.
+ */
+ public void shadeBackgroundAndForegroundColor(final double shadeFactor) {
+ backgroundColor = ColorFunctions.shade(backgroundColor, shadeFactor);
+ foregroundColor = ColorFunctions.shade(foregroundColor, shadeFactor);
+ updateCacheHash();
+ }
+
/**
* Sets the new character.
*
