summaryrefslogtreecommitdiff
path: root/RGBImage.c
diff options
context:
space:
mode:
Diffstat (limited to 'RGBImage.c')
-rw-r--r--RGBImage.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/RGBImage.c b/RGBImage.c
index 8f6c8d2..2896d72 100644
--- a/RGBImage.c
+++ b/RGBImage.c
@@ -12,7 +12,14 @@ ARGB_set(ARGB* rgb, color color) {
}
void
-ARGB_merge(ARGB* bottom, ARGB top) {
+ARGB_merge(ARGB* bottom, color top) {
+ ARGB temp;
+ ARGB_set(&temp, top);
+ ARGB_mergeARGB(bottom, temp);
+}
+
+void
+ARGB_mergeARGB(ARGB* bottom, ARGB top) {
bottom->a = 255;
double perc = top.a / 255.0;