Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/e9401de768fa2a3c37bc3...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/e9401de768fa2a3c37bc3f1...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/e9401de768fa2a3c37bc3f13a...
The branch, master has been updated
via e9401de768fa2a3c37bc3f13a06bb3bc32c8dc4c (commit)
from 81a1506c5c3a5b1581c3f16350a64ce58e695c09 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=e9401de768fa2a3c37b...
commit e9401de768fa2a3c37bc3f13a06bb3bc32c8dc4c
Author: Michael Drake <tlsa(a)netsurf-browser.org>
Commit: Michael Drake <tlsa(a)netsurf-browser.org>
Move mix_colour macro out of treeview for other stuff to use.
diff --git a/desktop/plot_style.h b/desktop/plot_style.h
index f965a25..71243a9 100644
--- a/desktop/plot_style.h
+++ b/desktop/plot_style.h
@@ -66,6 +66,14 @@
(((c0 & 0xff0000) * 28) >> 24)) > \
(0xff / 2)) ? 0x000000 : 0xffffff)
+/* Mix two colours according to the proportion given by p, where 0 <= p <= 255
+ * p = 0 gives result ==> c1, p = 255 gives result ==> c0 */
+#define mix_colour(c0, c1, p) \
+ ((((((c1 & 0xff00ff) * (255 - p)) + \
+ ((c0 & 0xff00ff) * ( p)) ) >> 8) & 0xff00ff) | \
+ (((((c1 & 0x00ff00) * (255 - p)) + \
+ ((c0 & 0x00ff00) * ( p)) ) >> 8) & 0x00ff00))
+
/* get a bitmap pixel (image/bitmap.h) into a plot colour */
#define pixel_to_colour(b) \
b[0] | (b[1] << 8) | (b[2] << 16) | (b[3] << 24)
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 3895832..1e3ea1e 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -1903,19 +1903,6 @@ void treeview_mouse_action(treeview *tree,
}
-
-/* Mix two colours according to the proportion given by p.
- * Where 0 <= p <= 255
- * p=0 gives result ==> c1
- * p=255 gives result ==> c0
- */
-#define mix_colour(c0, c1, p) \
- ((((((c1 & 0xff00ff) * (255 - p)) + \
- ((c0 & 0xff00ff) * ( p)) ) >> 8) & 0xff00ff) | \
- (((((c1 & 0x00ff00) * (255 - p)) + \
- ((c0 & 0x00ff00) * ( p)) ) >> 8) & 0x00ff00))
-
-
/**
* Initialise the plot styles from CSS system colour values.
*/
-----------------------------------------------------------------------
Summary of changes:
desktop/plot_style.h | 8 ++++++++
desktop/treeview.c | 13 -------------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/desktop/plot_style.h b/desktop/plot_style.h
index f965a25..71243a9 100644
--- a/desktop/plot_style.h
+++ b/desktop/plot_style.h
@@ -66,6 +66,14 @@
(((c0 & 0xff0000) * 28) >> 24)) > \
(0xff / 2)) ? 0x000000 : 0xffffff)
+/* Mix two colours according to the proportion given by p, where 0 <= p <= 255
+ * p = 0 gives result ==> c1, p = 255 gives result ==> c0 */
+#define mix_colour(c0, c1, p) \
+ ((((((c1 & 0xff00ff) * (255 - p)) + \
+ ((c0 & 0xff00ff) * ( p)) ) >> 8) & 0xff00ff) | \
+ (((((c1 & 0x00ff00) * (255 - p)) + \
+ ((c0 & 0x00ff00) * ( p)) ) >> 8) & 0x00ff00))
+
/* get a bitmap pixel (image/bitmap.h) into a plot colour */
#define pixel_to_colour(b) \
b[0] | (b[1] << 8) | (b[2] << 16) | (b[3] << 24)
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 3895832..1e3ea1e 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -1903,19 +1903,6 @@ void treeview_mouse_action(treeview *tree,
}
-
-/* Mix two colours according to the proportion given by p.
- * Where 0 <= p <= 255
- * p=0 gives result ==> c1
- * p=255 gives result ==> c0
- */
-#define mix_colour(c0, c1, p) \
- ((((((c1 & 0xff00ff) * (255 - p)) + \
- ((c0 & 0xff00ff) * ( p)) ) >> 8) & 0xff00ff) | \
- (((((c1 & 0x00ff00) * (255 - p)) + \
- ((c0 & 0x00ff00) * ( p)) ) >> 8) & 0x00ff00))
-
-
/**
* Initialise the plot styles from CSS system colour values.
*/
--
NetSurf Browser