aboutsummaryrefslogtreecommitdiff
path: root/generic/Item.c
diff options
context:
space:
mode:
authorlecoanet2002-11-05 09:29:25 +0000
committerlecoanet2002-11-05 09:29:25 +0000
commit9ec8c046838efe3d88077854505ffcaf0cc2b18f (patch)
tree29e595004fb23a89cc63acd04fbdfce32588b176 /generic/Item.c
parent82d8c4f1b6b26bdf6ff2ea1cef4349856274404a (diff)
downloadtkzinc-9ec8c046838efe3d88077854505ffcaf0cc2b18f.zip
tkzinc-9ec8c046838efe3d88077854505ffcaf0cc2b18f.tar.gz
tkzinc-9ec8c046838efe3d88077854505ffcaf0cc2b18f.tar.bz2
tkzinc-9ec8c046838efe3d88077854505ffcaf0cc2b18f.tar.xz
Correction pour permettre de forcer la mise � jour d'une bitmap/image
suite � sa modification interne. Prise en compte des modifs de la structure tristrip.
Diffstat (limited to 'generic/Item.c')
-rw-r--r--generic/Item.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/generic/Item.c b/generic/Item.c
index b2b6a6a..1bf6cb7 100644
--- a/generic/Item.c
+++ b/generic/Item.c
@@ -336,12 +336,18 @@ ZnConfigureAttributes(WidgetInfo *wi,
case ZN_CONFIG_BITMAP:
{
ZnImage image = ZnUnspecifiedImage;
- char *msg, *name = "";
+ char *msg;
+#if 0
+ char *name = "";
+
if (*((ZnImage *) valp) != ZnUnspecifiedImage) {
name = ZnNameOfImage(*((ZnImage *) valp));
}
+#endif
str = Tcl_GetString(args[i+1]);
+#if 0
if (strcmp(name, str) != 0) {
+#endif
if (strlen(str) != 0) {
if (desc->type == ZN_CONFIG_IMAGE) {
image = ZnGetImage(wi, str);
@@ -361,7 +367,9 @@ ZnConfigureAttributes(WidgetInfo *wi,
}
*((ZnImage *) valp) = image;
*flags |= desc->flags;
+#if 0
}
+#endif
break;
}
case ZN_CONFIG_BITMAP_LIST:
@@ -2289,7 +2297,10 @@ ZnPushClip(WidgetInfo *wi,
* the tristrip, so we can use the corresponding
* polygon instead of going through all the triangles.
*/
- if (tristrip->fan) {
+ if (tristrip->strips[j].fan) {
+ /* Skip the center */
+ p++;
+ num_pts--;
xp2 = xpts2 = ZnMalloc(num_pts*sizeof(XPoint));
for (i = 0 ; i < num_pts; i++, p++, xp2++) {
xp2->x = (short) p->x;
@@ -2369,9 +2380,8 @@ ZnPushClip(WidgetInfo *wi,
for (j = 0; j < tristrip->num_strips; j++) {
num_pts = tristrip->strips[j].num_points;
p = tristrip->strips[j].points;
- if (tristrip->fan) {
+ if (tristrip->strips[j].fan) {
glBegin(GL_TRIANGLE_FAN);
- glVertex2f(tristrip->center.x, tristrip->center.y);
}
else {
glBegin(GL_TRIANGLE_STRIP);