summaryrefslogtreecommitdiffstats
path: root/tksao/frame/ds9parser.Y
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-03-11 21:17:59 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-03-11 21:17:59 (GMT)
commiteef1b4e01cc3c5307188e1497e6b095081eef378 (patch)
treeb27c812b352c9024fe4a5b9dbab6f6102a581156 /tksao/frame/ds9parser.Y
parentf7a9669c931c4da48dbc39d3f90b17ea2314ab9c (diff)
downloadblt-eef1b4e01cc3c5307188e1497e6b095081eef378.zip
blt-eef1b4e01cc3c5307188e1497e6b095081eef378.tar.gz
blt-eef1b4e01cc3c5307188e1497e6b095081eef378.tar.bz2
add region fill
Diffstat (limited to 'tksao/frame/ds9parser.Y')
-rw-r--r--tksao/frame/ds9parser.Y25
1 files changed, 18 insertions, 7 deletions
diff --git a/tksao/frame/ds9parser.Y b/tksao/frame/ds9parser.Y
index 76d5f66..cd9400f 100644
--- a/tksao/frame/ds9parser.Y
+++ b/tksao/frame/ds9parser.Y
@@ -59,6 +59,9 @@ static char localText[80];
static char localComment[80];
+static int globalFill;
+static int localFill;
+
static int globalLine1;
static int localLine1;
static int globalLine2;
@@ -211,6 +214,7 @@ static Coord::SkyFrame checkWCSSky();
%token EPANDA_
%token FALSE_
%token FIELD_
+%token FILL_
%token FIXED_
%token FK4_
%token FK4_NO_E_
@@ -653,6 +657,10 @@ globalProperty : property '=' yesno
globalPoint = localPoint = $3;
globalPointSize = localPointSize = $4;
}
+ | FILL_ '=' INT
+ {
+ globalFill = localFill = $3;
+ }
| LINE_ '=' INT INT
{
globalLine1 = localLine1 = $3;
@@ -783,6 +791,7 @@ initGlobal:{
strcpy(globalText,"");
// unique properties
+ globalFill = 0;
globalLine1 = 0;
globalLine2 = 0;
globalVector = 1;
@@ -830,6 +839,7 @@ localProperty : property '=' yesno {setProps(&localProps,$1,$3);}
| POINT_ '=' pointShape {localPoint = $3;}
| POINT_ '=' pointShape INT {localPoint = $3; localPointSize = $4;}
+ | FILL_ '=' INT {localFill=$3;}
| LINE_ '=' INT INT {localLine1=$3; localLine2=$4;}
| VECTOR_ '=' INT {localVector=$3;}
| COMPOSITE_ '=' INT {localComposite=$3;}
@@ -974,6 +984,7 @@ initLocal : {
cblist.deleteAll();
// unique properties
+ localFill = globalFill;
localLine1 = globalLine1;
localLine2 = globalLine2;
localVector = globalVector;
@@ -1064,7 +1075,7 @@ nonshape : VECTOR_ bp coord sp value sp angle ep conjunction nonshapeComment
{
// backward compatibility
fr->createCircleCmd(Vector($3),
- $5,
+ $5, localFill,
localColor,localDash,localWidth,localFont,
localText,localProps,localComment,taglist,cblist);
}
@@ -1080,7 +1091,7 @@ nonshape : VECTOR_ bp coord sp value sp angle ep conjunction nonshapeComment
shape : CIRCLE_ bp coord sp value ep conjunction shapeComment
{
fr->createCircleCmd(Vector($3),
- $5,
+ $5, localFill,
localColor,localDash,localWidth,localFont,
localText,localProps,localComment,taglist,cblist);
}
@@ -1088,7 +1099,7 @@ shape : CIRCLE_ bp coord sp value ep conjunction shapeComment
{
// backwards compatibility
fr->createCircleCmd(Vector($3),
- $5,
+ $5, localFill,
localColor,localDash,localWidth,localFont,
localText,localProps,localComment,taglist,cblist);
}
@@ -1111,7 +1122,7 @@ shape : CIRCLE_ bp coord sp value ep conjunction shapeComment
fr->createEllipseCmd(Vector($3),
Vector($5),
- $7,
+ $7, localFill,
localColor,localDash,localWidth,localFont,
localText,localProps,localComment,taglist,cblist);
}
@@ -1134,7 +1145,7 @@ shape : CIRCLE_ bp coord sp value ep conjunction shapeComment
fr->createBoxCmd(Vector($3),
Vector($5),
- $7,
+ $7, localFill,
localColor,localDash,localWidth,localFont,
localText,localProps,localComment,taglist,cblist);
}
@@ -1143,14 +1154,14 @@ shape : CIRCLE_ bp coord sp value ep conjunction shapeComment
// backwards compatibility
fr->createBoxCmd(Vector($3),
Vector($5),
- $7,
+ $7, localFill,
localColor,localDash,localWidth,localFont,
localText,localProps,localComment,taglist,cblist);
}
| POLYGON_ {polylist.deleteAll();} bp polyNodes ep conjunction
shapeComment
{
- fr->createPolygonCmd(polylist,
+ fr->createPolygonCmd(polylist, localFill,
localColor,localDash,localWidth,localFont,
localText,localProps,localComment,taglist,cblist);
}