Fixed calma custom paths (pathtype 4) so that it doesn't generate
an error message (otherwise it was already being handled correctly).
This commit is contained in:
parent
8258058aab
commit
e099dde8d2
|
|
@ -443,7 +443,8 @@ calmaElementPath()
|
||||||
if (nbytes > 0 && rtype == CALMA_PATHTYPE)
|
if (nbytes > 0 && rtype == CALMA_PATHTYPE)
|
||||||
if (!calmaReadI2Record(CALMA_PATHTYPE, &pathtype)) return;
|
if (!calmaReadI2Record(CALMA_PATHTYPE, &pathtype)) return;
|
||||||
|
|
||||||
if (pathtype != CALMAPATH_SQUAREFLUSH && pathtype != CALMAPATH_SQUAREPLUS)
|
if (pathtype != CALMAPATH_SQUAREFLUSH && pathtype != CALMAPATH_SQUAREPLUS &&
|
||||||
|
pathtype != CALMAPATH_CUSTOM)
|
||||||
{
|
{
|
||||||
calmaReadError("Warning: pathtype %d unsupported (ignored).\n", pathtype);
|
calmaReadError("Warning: pathtype %d unsupported (ignored).\n", pathtype);
|
||||||
pathtype = CALMAPATH_SQUAREFLUSH;
|
pathtype = CALMAPATH_SQUAREFLUSH;
|
||||||
|
|
@ -469,8 +470,17 @@ calmaElementPath()
|
||||||
|
|
||||||
width /= calmaReadScale2;
|
width /= calmaReadScale2;
|
||||||
|
|
||||||
/* Handle BGNEXTN, ENDEXTN */
|
/* Set path extensions based on path type */
|
||||||
|
if (pathtype == CALMAPATH_SQUAREFLUSH || pathtype == CALMAPATH_CUSTOM)
|
||||||
|
{
|
||||||
extend1 = extend2 = 0;
|
extend1 = extend2 = 0;
|
||||||
|
}
|
||||||
|
else if (pathtype == CALMAPATH_SQUAREPLUS || pathtype == CALMAPATH_ROUND)
|
||||||
|
{
|
||||||
|
extend1 = extend2 = (width / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Handle BGNEXTN, ENDEXTN */
|
||||||
PEEKRH(nbytes, rtype);
|
PEEKRH(nbytes, rtype);
|
||||||
if (nbytes > 0 && rtype == CALMA_BGNEXTN)
|
if (nbytes > 0 && rtype == CALMA_BGNEXTN)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@
|
||||||
#define CALMAPATH_SQUAREFLUSH 0 /* Square end flush with endpoint */
|
#define CALMAPATH_SQUAREFLUSH 0 /* Square end flush with endpoint */
|
||||||
#define CALMAPATH_ROUND 1 /* Round end */
|
#define CALMAPATH_ROUND 1 /* Round end */
|
||||||
#define CALMAPATH_SQUAREPLUS 2 /* Square end plus half-width extent */
|
#define CALMAPATH_SQUAREPLUS 2 /* Square end plus half-width extent */
|
||||||
|
#define CALMAPATH_CUSTOM 4 /* Endcaps at specified lengths */
|
||||||
|
|
||||||
/* Largest calma layer or data type numbers */
|
/* Largest calma layer or data type numbers */
|
||||||
#define CALMA_LAYER_MAX 255
|
#define CALMA_LAYER_MAX 255
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue