aboutsummaryrefslogtreecommitdiff
path: root/generic
diff options
context:
space:
mode:
authorlecoanet2000-03-07 14:53:57 +0000
committerlecoanet2000-03-07 14:53:57 +0000
commit6e7c9eb14261e850df1401e7093c0b8092f50da4 (patch)
tree8b9fbef8055da4a6a5d7ac5802f3c5cea57ae2bb /generic
parentc19a834c8c030ee48e03095dbd114caa946ac947 (diff)
downloadtkzinc-6e7c9eb14261e850df1401e7093c0b8092f50da4.zip
tkzinc-6e7c9eb14261e850df1401e7093c0b8092f50da4.tar.gz
tkzinc-6e7c9eb14261e850df1401e7093c0b8092f50da4.tar.bz2
tkzinc-6e7c9eb14261e850df1401e7093c0b8092f50da4.tar.xz
* Correction de bug sur le tuilage. On utilise d�sormais
le nom de l'image plutot que l'image. * Correction d'un core dump dans Configure lors d'une session interactive si un attribut est inconnu (l'erreur ne provoque pas l'arret). * Autorisation du relief pour les Beziers et les polys liss�s.
Diffstat (limited to 'generic')
-rw-r--r--generic/Curve.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/generic/Curve.c b/generic/Curve.c
index 0d17e09..59f6dd6 100644
--- a/generic/Curve.c
+++ b/generic/Curve.c
@@ -184,7 +184,7 @@ CvTileChange(ClientData client_data,
{
CurveItem cv = (CurveItem) client_data;
- InvalidateImage(cv->tile);
+ InvalidateImage(cv->tile_name);
ITEM.Invalidate((Item) cv, ZN_COORDS_FLAG);
}
@@ -372,13 +372,13 @@ Destroy(Item item)
if (cv->gradient) {
ZnFreeColorGradient(cv->gradient);
}
- if (strlen(cv->tile_name) != 0) {
- ZnFree(cv->tile_name);
- }
if (cv->tile != ZnUnspecifiedImage) {
Tk_FreeImage(cv->tile);
cv->tile = ZnUnspecifiedImage;
}
+ if (strlen(cv->tile_name) != 0) {
+ ZnFree(cv->tile_name);
+ }
if (cv->line_pattern != ZnUnspecifiedPattern) {
Tk_FreeBitmap(wi->dpy, cv->line_pattern);
}
@@ -419,8 +419,8 @@ SetRenderFlags(CurveItem cv)
ASSIGN(cv->flags, RELIEF_OK,
(cv->relief != RELIEF_FLAT) && (ZnListSize(cv->points) > 1) &&
- (cv->line_width > 1) && ISCLEAR(cv->flags, SMOOTHED_OK) &&
- ISCLEAR(cv->flags, BEZIER_OK));
+ (cv->line_width > 1)/* && ISCLEAR(cv->flags, SMOOTHED_OK) &&
+ ISCLEAR(cv->flags, BEZIER_OK)*/);
ASSIGN(cv->flags, MARKER_OK,
(cv->marker != ZnUnspecifiedPattern) && ISCLEAR(cv->flags, BEZIER_OK) &&
@@ -453,11 +453,10 @@ Configure(Item item,
{
WidgetInfo *wi = item->wi;
CurveItem cv = (CurveItem) item;
-
- if (ITEM_P.ConfigureAttributes((char *) item, -1, argc, argv, flags) == ZN_ERROR) {
- return ZN_ERROR;
- }
+ int status = ZN_OK;
+ status = ITEM_P.ConfigureAttributes((char *) item, -1, argc, argv, flags);
+
if (cv->gradient &&
(ISSET(*flags, ZN_BORDER_FLAG) || (cv->relief == RELIEF_FLAT))) {
ZnFreeColorGradient(cv->gradient);
@@ -465,7 +464,7 @@ Configure(Item item,
}
if ((cv->relief != RELIEF_FLAT) && !cv->gradient) {
cv->gradient = ZnGetReliefGradient(wi->interp, wi->win,
- ZnNameOfColor(cv->fill_color));
+ ZnNameOfColor(cv->fill_color));
}
if (ISSET(*flags, ZN_TILE_FLAG)) {
Tk_Image tile;
@@ -478,7 +477,7 @@ Configure(Item item,
* The name will not be in sync with the image in
* this case.
*/
- return ZN_ERROR;
+ status = ZN_ERROR;
}
}
else {
@@ -492,7 +491,7 @@ Configure(Item item,
SetRenderFlags(cv);
- return ZN_OK;
+ return status;
}
@@ -884,7 +883,7 @@ Draw(Item item)
values.foreground = ZnPixel(cv->fill_color);
gc_mask = GCFillStyle;
if (cv->tile != ZnUnspecifiedImage) { /* Fill tiled */
- Pixmap pmap = GetImagePixmap(wi->win, cv->tile);
+ Pixmap pmap = GetImagePixmap(wi->win, cv->tile_name, cv->tile, NULL);
values.fill_style = FillTiled;
values.tile = pmap;
values.ts_x_origin = REAL_TO_INT(item->item_bounding_box.orig.x);