From 301f9c4bdff755ad16faf89594776e6109590bbe Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Thu, 21 Sep 2023 21:52:24 +0200 Subject: [PATCH] add experimental compile flag in xschem.h, FIX_BROKEN_TILED_FILL, if defined work around some graphic adapters/driver implemtations that dont honor the X11 specifications for drawing with a pixmap tile fill pattern --- XSchemWin/XSchemWix/Product.wxs | 2 +- XSchemWin/XSchemWix/doc.wxs | 112 +++++ XSchemWin/XSchemWix/heat_doc.wxs | 790 ++++++++++++++++++------------- src/callback.c | 4 +- src/xschem.h | 5 + 5 files changed, 571 insertions(+), 342 deletions(-) diff --git a/XSchemWin/XSchemWix/Product.wxs b/XSchemWin/XSchemWix/Product.wxs index d0e1ecf1..979478cb 100644 --- a/XSchemWin/XSchemWix/Product.wxs +++ b/XSchemWin/XSchemWix/Product.wxs @@ -1,6 +1,6 @@ - + diff --git a/XSchemWin/XSchemWix/doc.wxs b/XSchemWin/XSchemWix/doc.wxs index 65f8f3cb..5a086ff2 100644 --- a/XSchemWin/XSchemWix/doc.wxs +++ b/XSchemWin/XSchemWix/doc.wxs @@ -282,6 +282,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -570,6 +651,9 @@ + + + @@ -1122,6 +1206,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1218,6 +1329,7 @@ + diff --git a/XSchemWin/XSchemWix/heat_doc.wxs b/XSchemWin/XSchemWix/heat_doc.wxs index 6ebde440..314725c7 100644 --- a/XSchemWin/XSchemWix/heat_doc.wxs +++ b/XSchemWin/XSchemWix/heat_doc.wxs @@ -3,1024 +3,1108 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -1121,6 +1205,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1217,6 +1328,7 @@ + diff --git a/src/callback.c b/src/callback.c index 3e985886..1dc5d6cf 100644 --- a/src/callback.c +++ b/src/callback.c @@ -1128,7 +1128,7 @@ int callback(const char *winpath, int event, int mx, int my, KeySym key, break; } if(xctx->ui_state & STARTPAN) pan(RUBBER, mx, my); - #ifndef __unix__ + #if defined(FIX_BROKEN_TILED_FILL) || !defined(__unix__) if ((xctx->ui_state & STARTWIRE) || (xctx->ui_state & STARTARC) || (xctx->ui_state & STARTLINE) || (xctx->ui_state & STARTMOVE) || (xctx->ui_state & STARTCOPY) || (xctx->ui_state & STARTRECT) || @@ -2786,7 +2786,7 @@ int callback(const char *winpath, int event, int mx, int my, KeySym key, xctx->my_double_save=xctx->mousey_snap; if( !(state & ShiftMask) && !(state & Mod1Mask) ) { unselect_all(1); -#ifndef __unix__ +#if defined(FIX_BROKEN_TILED_FILL) || !defined(__unix__) MyXCopyArea(display, xctx->save_pixmap, xctx->window, xctx->gctiled, xctx->xrect[0].x, xctx->xrect[0].y, xctx->xrect[0].width, xctx->xrect[0].height, xctx->xrect[0].x, xctx->xrect[0].y); #endif diff --git a/src/xschem.h b/src/xschem.h index 001e6ecc..6a987331 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -114,6 +114,11 @@ extern char win_temp_dir[PATH_MAX]; #if HAS_CAIRO==1 #define DRAW_ALL_CAIRO 0 /* use cairo for all graphics. Work in progress! */ + +/* Uncomment below #define if your graphic adapter shows garbage on screen or there are missing objects + * while doing edit/copy/move operations with xschem. */ +/* #define FIX_BROKEN_TILED_FILL 1 */ + #include #include "cairo_jpg.h" #ifdef __unix__