Kaydet (Commit) 34fb25cd authored tarafından David Tardon's avatar David Tardon

fix alpha computation, followup

Change-Id: I7701368e152ce20adbc05802c7c6518183919d1f
üst 2aa40ece
From 584c9bcfed7295e5e0a9d5caafb32a5020b74300 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Mon, 12 Jan 2015 17:10:07 +0100
Subject: [PATCH] lrf: compute color interpolation coeff. correctly
---
src/lib/LRFCollector.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/LRFCollector.cpp b/src/lib/LRFCollector.cpp
index 1c02593..3fbee2e 100644
--- a/src/lib/LRFCollector.cpp
+++ b/src/lib/LRFCollector.cpp
@@ -50,7 +50,7 @@ const LRFColor combine(const LRFColor &fg, const LRFColor &bg)
{
assert(0 == bg.a);
- const double a = fg.a / 255.0;
+ const double a = 1 - fg.a / 255.0;
const double r = (1 - a) * bg.r + a * fg.r;
const double g = (1 - a) * bg.g + a * fg.g;
--
2.1.0
......@@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libebook,0))
$(eval $(call gb_UnpackedTarball_add_patches,libebook, \
external/libebook/ubsan.patch \
external/libebook/0001-lrf-compute-color-interpolation-coeff.-correctly.patch.1 \
))
# vim: set noet sw=4 ts=4:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment