summaryrefslogtreecommitdiffstats
path: root/Tools/AnvilStats/ImageComposingCallback.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-30 23:32:27 +0200
committermadmaxoft <github@xoft.cz>2013-08-30 23:32:27 +0200
commit79b79e5b77fbbd70dab6cb23592991726a8c6d80 (patch)
tree044595dc2e0f19e2b4b6f4a5134c8caf77fc1675 /Tools/AnvilStats/ImageComposingCallback.h
parentMerge branch 'Projectiles' (diff)
downloadcuberite-79b79e5b77fbbd70dab6cb23592991726a8c6d80.tar
cuberite-79b79e5b77fbbd70dab6cb23592991726a8c6d80.tar.gz
cuberite-79b79e5b77fbbd70dab6cb23592991726a8c6d80.tar.bz2
cuberite-79b79e5b77fbbd70dab6cb23592991726a8c6d80.tar.lz
cuberite-79b79e5b77fbbd70dab6cb23592991726a8c6d80.tar.xz
cuberite-79b79e5b77fbbd70dab6cb23592991726a8c6d80.tar.zst
cuberite-79b79e5b77fbbd70dab6cb23592991726a8c6d80.zip
Diffstat (limited to '')
-rw-r--r--Tools/AnvilStats/ImageComposingCallback.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Tools/AnvilStats/ImageComposingCallback.h b/Tools/AnvilStats/ImageComposingCallback.h
index c04dc869f..2936361d6 100644
--- a/Tools/AnvilStats/ImageComposingCallback.h
+++ b/Tools/AnvilStats/ImageComposingCallback.h
@@ -77,6 +77,16 @@ public:
/// Sets a row of pixels. a_Pixels is expected to be a_CountU pixels wide. a_RelUStart + a_CountU is assumed less than image width
void SetPixelURow(int a_RelUStart, int a_RelV, int a_CountU, int * a_Pixels);
+ /** "Shades" the given color based on the shade amount given
+ Shade amount 0 .. 63 shades the color from black to a_Color.
+ Shade amount 64 .. 127 shades the color from a_Color to white.
+ All other shade amounts have undefined results.
+ */
+ static int ShadeColor(int a_Color, int a_Shade);
+
+ /// Mixes the two colors in the specified ratio; a_Ratio is between 0 and 256, 0 returning a_Src
+ static int MixColor(int a_Src, int a_Dest, int a_Ratio);
+
protected:
/// Prefix for the filenames, when generated by the default GetFileName() function
AString m_FileNamePrefix;