3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
|
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
|
-
-
+
+
|
}
pik_append_txt(p, pElem, 0);
}
/* Methods for the "text" class */
static void textInit(Pik *p, PElem *pElem){
pElem->w = pik_value(p, "textwid",7,0);
pElem->h = pik_value(p, "textht",6,0);
pik_value(p, "textwid",7,0);
pik_value(p, "textht",6,0);
pElem->sw = 0.0;
}
/* Methods for the "sublist" class */
static void sublistInit(Pik *p, PElem *pElem){
PEList *pList = pElem->pSublist;
int i;
|
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
|
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
|
-
+
|
{ /* name */ "text",
/* isline */ 0,
/* eJust */ 0,
/* xInit */ textInit,
/* xNumProp */ 0,
/* xChop */ boxChop,
/* xOffset */ boxOffset,
/* xFit */ 0,
/* xFit */ boxFit,
/* xRender */ boxRender
},
};
static const PClass sublistClass =
{ /* name */ "[]",
/* isline */ 0,
/* eJust */ 0,
|
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
|
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
|
-
+
|
** If pBasis is not NULL then it should be a [] element. Use the
** sublist of that [] element for the search. If pBasis is not a []
** element, then throw an error.
**
** The pNth token describes the N-th search. The pNth->eCode value
** is one more than the number of items to skip. It is negative
** to search backwards. If pNth->eType==T_ID, then it is the name
** of a primative time to search for. If pNth->eType==T_LB, then
** of a class to search for. If pNth->eType==T_LB, then
** search for a [] object. If pNth->eType==T_LAST, then search for
** any type.
**
** Raise an error if the item is not found.
*/
static PElem *pik_find_nth(Pik *p, PElem *pBasis, PToken *pNth){
PEList *pList;
|
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
|
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
|
-
+
|
/* Add all elements of the list pEList to the bounding box
*/
static void pik_bbox_add_elist(Pik *p, PEList *pEList, PNum wArrow){
int i;
for(i=0; i<pEList->n; i++){
PElem *pElem = pEList->a[i];
pik_bbox_addbox(&p->bbox, &pElem->bbox);
if( pElem->sw>0.0 ) pik_bbox_addbox(&p->bbox, &pElem->bbox);
pik_append_txt(p, pElem, &p->bbox);
if( pElem->pSublist ) pik_bbox_add_elist(p, pElem->pSublist, wArrow);
/* Expand the bounding box to account for arrowheads on lines */
if( pElem->type->isLine && pElem->nPath>0 ){
if( pElem->larrow ){
|
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
|
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
|
+
|
{ "max", 3, T_FUNC2, FN_MAX, 0 },
{ "min", 3, T_FUNC2, FN_MIN, 0 },
{ "n", 1, T_EDGEPT, 0, CP_N },
{ "ne", 2, T_EDGEPT, 0, CP_NE },
{ "north", 5, T_EDGEPT, 0, CP_N },
{ "nw", 2, T_EDGEPT, 0, CP_NW },
{ "of", 2, T_OF, 0, 0 },
{ "previous", 8, T_LAST, 0, 0, },
{ "print", 5, T_PRINT, 0, 0 },
{ "rad", 3, T_RADIUS, 0, 0 },
{ "radius", 6, T_RADIUS, 0, 0 },
{ "right", 5, T_RIGHT, DIR_RIGHT, CP_E },
{ "rjust", 5, T_RJUST, 0, 0 },
{ "s", 1, T_EDGEPT, 0, CP_S },
{ "same", 4, T_SAME, 0, 0 },
|