aboutsummaryrefslogtreecommitdiff
path: root/generic/Draw.c
diff options
context:
space:
mode:
authorlecoanet2004-03-23 14:53:46 +0000
committerlecoanet2004-03-23 14:53:46 +0000
commitbfcdb3b51ea88028b63f3f2d9577659e4119d20a (patch)
tree60a2f38988e2719012fbe719cbd19db7d1101f14 /generic/Draw.c
parentc15cc9537d6c0d2bf6d5417bd96930cae4381162 (diff)
downloadtkzinc-bfcdb3b51ea88028b63f3f2d9577659e4119d20a.zip
tkzinc-bfcdb3b51ea88028b63f3f2d9577659e4119d20a.tar.gz
tkzinc-bfcdb3b51ea88028b63f3f2d9577659e4119d20a.tar.bz2
tkzinc-bfcdb3b51ea88028b63f3f2d9577659e4119d20a.tar.xz
Changes related to OpenGL context handling (only one context per display) and patches to avoid using widget structure in image cache */
Diffstat (limited to 'generic/Draw.c')
-rw-r--r--generic/Draw.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/Draw.c b/generic/Draw.c
index 4375e13..ee37388 100644
--- a/generic/Draw.c
+++ b/generic/Draw.c
@@ -42,6 +42,7 @@
#include "List.h"
#include "WidgetInfo.h"
#include "Image.h"
+#include "tkZinc.h"
#include <math.h>
#include <stdarg.h>
@@ -1157,6 +1158,7 @@ ZnRenderPolyline(ZnWInfo *wi,
ZnPoint c1, c2;
XColor *color;
unsigned short alpha;
+ ZnGLContextEntry *ce = ZnGetGLContext(wi->dpy);
/*
* The code below draws curves thiner than the min
@@ -1166,8 +1168,8 @@ ZnRenderPolyline(ZnWInfo *wi,
* BUG: The joints are drawn only rounded.
* The caps can be either round or butt (but not projecting).
*/
- thin = ((line_width <= wi->max_line_width) &&
- (line_width <= wi->max_point_width));
+ thin = ((line_width <= ce->max_line_width) &&
+ (line_width <= ce->max_point_width));
closed = (points->x == points[num_points-1].x) && (points->y == points[num_points-1].y);
color = ZnGetGradientColor(gradient, 0.0, &alpha);
alpha = ZnComposeAlpha(alpha, wi->alpha);