mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 14:17:43 +02:00
Corrected the "bloat-all" function so that it behaves properly on
angled edges. This is a rare case and so has never come up before, but can happen especially on transistors with gate or diffusion with 45 degree chamfers or flanges. Thanks to Mark Martin for providing the use case.
This commit is contained in:
+19
-2
@@ -1379,8 +1379,24 @@ cifBloatAllFunc(tile, bls)
|
||||
area.r_xtop *= locScale;
|
||||
area.r_ytop *= locScale;
|
||||
|
||||
DBNMPaintPlane(cifPlane, TiGetTypeExact(t), &area,
|
||||
CIFPaintTable, (PaintUndoInfo *) NULL);
|
||||
/* Diagonal: If expanding across the edge of a diagonal, */
|
||||
/* then just fill the whole tile. */
|
||||
|
||||
if (IsSplit(t))
|
||||
{
|
||||
TileType tt;
|
||||
tt = TiGetTypeExact(t);
|
||||
if ((tt & TT_SIDE) && (TTMaskHasType(connect, TiGetLeftType(t))))
|
||||
DBPaintPlane(cifPlane, &area, CIFPaintTable, (PaintUndoInfo *) NULL);
|
||||
else if (!(tt & TT_SIDE) && (TTMaskHasType(connect, TiGetRightType(t))))
|
||||
DBPaintPlane(cifPlane, &area, CIFPaintTable, (PaintUndoInfo *) NULL);
|
||||
else
|
||||
DBNMPaintPlane(cifPlane, TiGetTypeExact(t), &area,
|
||||
CIFPaintTable, (PaintUndoInfo *) NULL);
|
||||
}
|
||||
else
|
||||
DBNMPaintPlane(cifPlane, TiGetTypeExact(t), &area,
|
||||
CIFPaintTable, (PaintUndoInfo *) NULL);
|
||||
|
||||
/* Top */
|
||||
for (tp = RT(t); RIGHT(tp) > LEFT(t); tp = BL(tp))
|
||||
@@ -1401,6 +1417,7 @@ cifBloatAllFunc(tile, bls)
|
||||
for (tp = TR(t); TOP(tp) > BOTTOM(t); tp = LB(tp))
|
||||
if (TTMaskHasType(connect, TiGetLeftType(tp)))
|
||||
PUSHTILE(tp, BloatStack);
|
||||
|
||||
}
|
||||
|
||||
/* Clear the tiles that were processed */
|
||||
|
||||
Reference in New Issue
Block a user