diff --git a/VERSION b/VERSION index b6eeaf68..de3ac290 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.516 +8.3.517 diff --git a/cif/CIFgen.c b/cif/CIFgen.c index 9315e36e..67950ba1 100644 --- a/cif/CIFgen.c +++ b/cif/CIFgen.c @@ -4664,8 +4664,8 @@ cifBridgeLimFunc2( * cifInteractingRegions -- * * Process each disjoint region and copy the entire content of each - * region for which any part of the region overlaps with <...> - * to the current CIF plane. + * region for which any part of the region overlaps with co_cifMask + * or co_paintMask to the current CIF plane. * * Results: * None. @@ -4714,6 +4714,19 @@ cifInteractingRegions( /* Get tile area for interaction search */ TiToRect(t, &area); + /* "interacting" includes touching as well as overlapping, so expand + * search by one unit in every direction and then check overlap. + * NOTE: This catches catecorner-touching material, which is + * assumed not to be an issue. + */ + if ((pointertype)op->co_client & CIFOP_INT_TOUCHING) + { + area.r_xbot -= 1; + area.r_xtop += 1; + area.r_ybot -= 1; + area.r_ytop += 1; + } + /* Check if this tile interacts with the rule's types, or skip */ /* if already known to be interacting. */ @@ -4752,11 +4765,12 @@ cifInteractingRegions( } } - /* op->co_client is an invert bit indicating the rule is "not-interact", - * so invert the sense of "interacts". Then the non-interacting regions - * will be kept and the interacting regions will be discarded. + /* op->co_client has an invert bit indicating the rule is "not interacting" + * or "not-overlapping", so invert the sense of "interacts". Then the non- + * interacting/overlapping regions will be kept and the interacting/ + * overlapping regions will be discarded. */ - if (op->co_client == (ClientData)1) + if ((pointertype)op->co_client & CIFOP_INT_NOT) interacts = (interacts) ? FALSE : TRUE; /* Clear the tiles that were processed in this set, first copying them */ diff --git a/cif/CIFint.h b/cif/CIFint.h index 18316843..6bd6b983 100644 --- a/cif/CIFint.h +++ b/cif/CIFint.h @@ -171,6 +171,9 @@ typedef struct cifop #define CIFOP_BRIDGELIM 23 #define CIFOP_MASKHINTS 24 +/* Definitions of bit fields used in the value of co_client for CIFOP_INTERACT */ +#define CIFOP_INT_NOT 0x1 /* Inverted sense (not interacting) */ +#define CIFOP_INT_TOUCHING 0x2 /* Include both touching and overlapping */ /* Added by Tim 10/21/2004 */ /* The following structure is used to pass information on how to draw diff --git a/cif/CIFtech.c b/cif/CIFtech.c index 7d4a5360..d9053ad4 100644 --- a/cif/CIFtech.c +++ b/cif/CIFtech.c @@ -1095,12 +1095,22 @@ CIFTechLine( newOp->co_opcode = CIFOP_BRIDGE; else if (strcmp(argv[0], "bridge-lim") == 0) newOp->co_opcode = CIFOP_BRIDGELIM; - else if (strcmp(argv[0], "interact") == 0) + else if (strcmp(argv[0], "overlapping") == 0) newOp->co_opcode = CIFOP_INTERACT; - else if (strcmp(argv[0], "not-interact") == 0) + else if (strcmp(argv[0], "nonoverlapping") == 0) { newOp->co_opcode = CIFOP_INTERACT; - newOp->co_client = (ClientData)1; + newOp->co_client = (ClientData)CIFOP_INT_NOT; + } + else if (strcmp(argv[0], "interacting") == 0) + { + newOp->co_opcode = CIFOP_INTERACT; + newOp->co_client = (ClientData)CIFOP_INT_TOUCHING; + } + else if (strcmp(argv[0], "noninteracting") == 0) + { + newOp->co_opcode = CIFOP_INTERACT; + newOp->co_client = (ClientData)(CIFOP_INT_TOUCHING | CIFOP_INT_NOT); } else { @@ -2463,6 +2473,7 @@ CIFTechOutputScale( case CIFOP_MASKHINTS: case CIFOP_MAXRECT: case CIFOP_NET: + case CIFOP_INTERACT: break; case CIFOP_BRIDGELIM: case CIFOP_BRIDGE: