mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 14:17:43 +02:00
Set of changes updating version 8.2 to the level of 8.1, since 8.2
development had been halted since it was first created back in April. Version 8.2 is now the official development version, with the first development push to create a Cairo graphics interface.
This commit is contained in:
+14
-7
@@ -515,19 +515,24 @@ cifCopyPaintFunc(tile, cifCopyRec)
|
||||
CIFCopyRec *cifCopyRec;
|
||||
{
|
||||
int pNum;
|
||||
TileType dinfo;
|
||||
Rect sourceRect, targetRect;
|
||||
Transform *trans = cifCopyRec->trans;
|
||||
Plane *plane = cifCopyRec->plane;
|
||||
|
||||
dinfo = TiGetTypeExact(tile);
|
||||
|
||||
if (trans)
|
||||
{
|
||||
TiToRect(tile, &sourceRect);
|
||||
GeoTransRect(trans, &sourceRect, &targetRect);
|
||||
if (IsSplit(tile))
|
||||
dinfo = DBTransformDiagonal(TiGetTypeExact(tile), trans);
|
||||
}
|
||||
else
|
||||
TiToRect(tile, &targetRect);
|
||||
|
||||
DBNMPaintPlane(plane, TiGetTypeExact(tile), &targetRect, CIFPaintTable,
|
||||
DBNMPaintPlane(plane, dinfo, &targetRect, CIFPaintTable,
|
||||
(PaintUndoInfo *)NULL);
|
||||
|
||||
return 0;
|
||||
@@ -612,8 +617,12 @@ CIFPaintCurrent()
|
||||
{
|
||||
CIFCopyRec cifCopyRec;
|
||||
|
||||
newplane = DBNewPlane((ClientData) TT_SPACE);
|
||||
DBClearPaintPlane(newplane);
|
||||
newplane = parray[pNum];
|
||||
if (newplane == NULL)
|
||||
{
|
||||
newplane = DBNewPlane((ClientData) TT_SPACE);
|
||||
DBClearPaintPlane(newplane);
|
||||
}
|
||||
|
||||
cifCopyRec.plane = newplane;
|
||||
cifCopyRec.trans = NULL;
|
||||
@@ -1064,8 +1073,7 @@ cifParseUser94()
|
||||
}
|
||||
if (type >=0 )
|
||||
{
|
||||
if (layer >= 0 && (cifCurReadStyle->crs_layers[layer]->crl_flags
|
||||
& CIFR_TEXTLABELS))
|
||||
if (layer >= 0 && cifCurReadStyle->crs_labelSticky[layer])
|
||||
flags = LABEL_STICKY;
|
||||
else
|
||||
flags = 0;
|
||||
@@ -1179,8 +1187,7 @@ cifParseUser95()
|
||||
if (type >=0 )
|
||||
{
|
||||
int flags;
|
||||
if (layer >= 0 && (cifCurReadStyle->crs_layers[layer]->crl_flags
|
||||
& CIFR_TEXTLABELS))
|
||||
if (layer >= 0 && cifCurReadStyle->crs_labelSticky[layer])
|
||||
flags = LABEL_STICKY;
|
||||
else
|
||||
flags = 0;
|
||||
|
||||
+2
-1
@@ -365,6 +365,7 @@ cifReadStyleInit()
|
||||
for (i = 0; i < MAXCIFRLAYERS; i++)
|
||||
{
|
||||
cifCurReadStyle->crs_labelLayer[i] = TT_SPACE;
|
||||
cifCurReadStyle->crs_labelSticky[i] = FALSE;
|
||||
cifCurReadStyle->crs_layers[i] = NULL;
|
||||
}
|
||||
}
|
||||
@@ -861,7 +862,7 @@ CIFReadTechLine(sectionName, argc, argv)
|
||||
cifCurReadStyle->crs_labelLayer[i]
|
||||
= cifCurReadLayer->crl_magicType;
|
||||
if (argc == 3)
|
||||
cifCurReadStyle->crs_layers[i]->crl_flags |= CIFR_TEXTLABELS;
|
||||
cifCurReadStyle->crs_labelSticky[i] = TRUE;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
+2
-3
@@ -52,13 +52,10 @@ typedef struct
|
||||
* a single OR operation, so it can be handled specially.
|
||||
* CIFR_TEMPLAYER: Means this layer is a temporary CIF layer, and that
|
||||
* the "crl_magicType" should be interpreted as a CIF layer.
|
||||
* CIFR_TEXTLABELS: Means this layer is used for text-only layers, not to
|
||||
* be moved or electrically connected to any other layer.
|
||||
*/
|
||||
|
||||
#define CIFR_SIMPLE 1
|
||||
#define CIFR_TEMPLAYER 2
|
||||
#define CIFR_TEXTLABELS 4
|
||||
|
||||
/* The following structure defines a complete CIF read-in style.
|
||||
* The constant MAXCIFRLAYERS must be less than TT_MAXTYPES, and
|
||||
@@ -107,6 +104,8 @@ typedef struct cifrstyle
|
||||
/* Gives the Magic layer to use for labels
|
||||
* on each possible CIF layer.
|
||||
*/
|
||||
bool crs_labelSticky[MAXCIFRLAYERS];
|
||||
/* Marker if label layer makes sticky labels */
|
||||
CIFReadLayer *crs_layers[MAXCIFRLAYERS];
|
||||
HashTable cifCalmaToCif; /* Table mapping from Calma layer numbers to
|
||||
* CIF layers
|
||||
|
||||
Reference in New Issue
Block a user