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 (!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);
|
||||
pathtype = CALMAPATH_SQUAREFLUSH;
|
||||
|
|
@ -469,8 +470,17 @@ calmaElementPath()
|
|||
|
||||
width /= calmaReadScale2;
|
||||
|
||||
/* Set path extensions based on path type */
|
||||
if (pathtype == CALMAPATH_SQUAREFLUSH || pathtype == CALMAPATH_CUSTOM)
|
||||
{
|
||||
extend1 = extend2 = 0;
|
||||
}
|
||||
else if (pathtype == CALMAPATH_SQUAREPLUS || pathtype == CALMAPATH_ROUND)
|
||||
{
|
||||
extend1 = extend2 = (width / 2);
|
||||
}
|
||||
|
||||
/* Handle BGNEXTN, ENDEXTN */
|
||||
extend1 = extend2 = 0;
|
||||
PEEKRH(nbytes, rtype);
|
||||
if (nbytes > 0 && rtype == CALMA_BGNEXTN)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@
|
|||
#define CALMAPATH_SQUAREFLUSH 0 /* Square end flush with endpoint */
|
||||
#define CALMAPATH_ROUND 1 /* Round end */
|
||||
#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 */
|
||||
#define CALMA_LAYER_MAX 255
|
||||
|
|
|
|||
Loading…
Reference in New Issue