mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-10-06 01:43:00 +02:00
Corrected a long-standing error, which caused "getcell child <point>"
to place a cell in a meaningless position for any rotation and flip combination other than zero. The issue was that the reference point was not rotated along with the cell.
This commit is contained in:
+6
-4
@@ -4814,7 +4814,7 @@ cmdDumpParseArgs(cmdName, w, cmd, dummy, scx)
|
||||
* cell itself.
|
||||
*/
|
||||
{
|
||||
Point childPoint, editPoint, rootPoint;
|
||||
Point childPoint, editPoint, rootPoint, refpoint;
|
||||
CellDef *def, *rootDef, *editDef;
|
||||
bool hasChild, hasRoot, hasTrans;
|
||||
Rect rootBox, bbox;
|
||||
@@ -5253,9 +5253,11 @@ box_error:
|
||||
|
||||
scx->scx_use = dummy;
|
||||
|
||||
GeoTranslateTrans(&trans_cell, rootPoint.p_x - childPoint.p_x,
|
||||
rootPoint.p_y - childPoint.p_y,
|
||||
&scx->scx_trans);
|
||||
/* Transform childPoint by trans_cell */
|
||||
GeoTransPoint(&trans_cell, &childPoint, &refpoint);
|
||||
GeoTranslateTrans(&trans_cell, rootPoint.p_x - refpoint.p_x,
|
||||
rootPoint.p_y - refpoint.p_y, &scx->scx_trans);
|
||||
|
||||
scx->scx_area = bbox;
|
||||
return TRUE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user