[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.1-20081221-47-g331e112)
The branch, master has been updated
via 331e1125d0847a3b9ff8bff6042fccce6befddd0 (commit)
from b6e8608d5642912ce10bf29119e5c86eb91634f7 (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.
=========
Summary
=========
gschem/src/gschem_cairo.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
=================
Commit Messages
=================
commit 331e1125d0847a3b9ff8bff6042fccce6befddd0
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Fri Dec 26 18:17:24 2008 +0000
gschem: Fix gschem_cairo_set_source_color to divide by 255, not 256.
This not only gives a more correct colour, but fixes a large performance
bottle-neck where an alpha value of 0xFF would lead to a cairo alpha !=
1.0, triggering far slower translucent rendering code-paths.
:100644 100644 7ba3605... d576cf3... M gschem/src/gschem_cairo.c
=========
Changes
=========
commit 331e1125d0847a3b9ff8bff6042fccce6befddd0
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date: Fri Dec 26 18:17:24 2008 +0000
gschem: Fix gschem_cairo_set_source_color to divide by 255, not 256.
This not only gives a more correct colour, but fixes a large performance
bottle-neck where an alpha value of 0xFF would lead to a cairo alpha !=
1.0, triggering far slower translucent rendering code-paths.
diff --git a/gschem/src/gschem_cairo.c b/gschem/src/gschem_cairo.c
index 7ba3605..d576cf3 100644
--- a/gschem/src/gschem_cairo.c
+++ b/gschem/src/gschem_cairo.c
@@ -187,8 +187,9 @@ void gschem_cairo_stroke (cairo_t *cr, int line_type, int line_end,
void gschem_cairo_set_source_color (cairo_t *cr, COLOR *color)
{
- cairo_set_source_rgba (cr, (double)color->r / 256.0,
- (double)color->g / 256.0,
- (double)color->b / 256.0,
- (double)color->a / 256.0);
+ if (((double)color->a / 255.0) != 1.0) printf ("aha, translucent!\n");
+ cairo_set_source_rgba (cr, (double)color->r / 255.0,
+ (double)color->g / 255.0,
+ (double)color->b / 255.0,
+ (double)color->a / 255.0);
}
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs