The R Project SVN R

Rev

Rev 27236 | Rev 31203 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27236 Rev 30998
Line 3075... Line 3075...
3075
    GClip(dd);
3075
    GClip(dd);
3076
    GEMathText(x, y, expr, xc, yc, rot, &gc, (GEDevDesc*) dd);
3076
    GEMathText(x, y, expr, xc, yc, rot, &gc, (GEDevDesc*) dd);
3077
}
3077
}
3078
 
3078
 
3079
void GMMathText(SEXP str, int side, double line, int outer,
3079
void GMMathText(SEXP str, int side, double line, int outer,
3080
		double at, int las, DevDesc *dd)
3080
		double at, int las, double yadj, DevDesc *dd)
3081
{
3081
{
3082
    int coords = 0, subcoords;
3082
    int coords = 0, subcoords;
3083
    double xadj, yadj = 0, angle = 0;
3083
    double xadj, angle = 0;
3084
 
3084
 
3085
#ifdef BUG61
3085
#ifdef BUG61
3086
#else
3086
#else
3087
    /* IF font metric information is not available for device */
3087
    /* IF font metric information is not available for device */
3088
    /* then bail out */
3088
    /* then bail out */
Line 3097... Line 3097...
3097
    /* This is MOSTLY the same as the same section of GMtext
3097
    /* This is MOSTLY the same as the same section of GMtext
3098
     * BUT it differs because it sets different values for yadj for
3098
     * BUT it differs because it sets different values for yadj for
3099
     * different situations.
3099
     * different situations.
3100
     * Paul
3100
     * Paul
3101
     */
3101
     */
-
 
3102
     /* changed to unify behaviour with changes in GMText. Uwe */
3102
    if(outer) {
3103
    if(outer) {
3103
	switch(side) {
3104
	switch(side) {
3104
	case 1:	    coords = OMA1;	break;
3105
	case 1:	    coords = OMA1;	break;
3105
	case 2:	    coords = OMA2;	break;
3106
	case 2:	    coords = OMA2;	break;
3106
	case 3:	    coords = OMA3;	break;
3107
	case 3:	    coords = OMA3;	break;
Line 3125... Line 3126...
3125
     */
3126
     */
3126
    switch(side) {
3127
    switch(side) {
3127
    case 1:
3128
    case 1:
3128
	if(las == 2 || las == 3) {
3129
	if(las == 2 || las == 3) {
3129
	    angle = 90;
3130
	    angle = 90;
3130
	    yadj = 0.5;
-
 
3131
	}
3131
	}
3132
	else {
3132
	else {
3133
	    /*	    line = line + 1 - Rf_gpptr(dd)->yLineBias;
3133
	    /*	    line = line + 1 - Rf_gpptr(dd)->yLineBias;
3134
		    angle = 0;
3134
		    angle = 0;
3135
		    yadj = NA_REAL; */
3135
		    yadj = NA_REAL; */
3136
	    line = line + 1;
3136
	    line = line + 1;
3137
	    angle = 0;
3137
	    angle = 0;
3138
	    yadj = 0;
-
 
3139
	}
3138
	}
3140
	break;
3139
	break;
3141
    case 2:
3140
    case 2:
3142
	if(las == 1 || las == 2) {
3141
	if(las == 1 || las == 2) {
3143
	    angle = 0;
3142
	    angle = 0;
3144
	    yadj = 0.5;
-
 
3145
	}
3143
	}
3146
	else {
3144
	else {
3147
	    /*	    line = line + Rf_gpptr(dd)->yLineBias;
3145
	    /*	    line = line + Rf_gpptr(dd)->yLineBias;
3148
		    angle = 90;
3146
		    angle = 90;
3149
		    yadj = NA_REAL; */
3147
		    yadj = NA_REAL; */
3150
	    angle = 90;
3148
	    angle = 90;
3151
	    yadj = 0;
-
 
3152
	}
3149
	}
3153
	break;
3150
	break;
3154
    case 3:
3151
    case 3:
3155
	if(las == 2 || las == 3) {
3152
	if(las == 2 || las == 3) {
3156
	    angle = 90;
3153
	    angle = 90;
3157
	    yadj = 0.5;
-
 
3158
	}
3154
	}
3159
	else {
3155
	else {
3160
	    /*   line = line + Rf_gpptr(dd)->yLineBias;
3156
	    /*   line = line + Rf_gpptr(dd)->yLineBias;
3161
		 angle = 0;
3157
		 angle = 0;
3162
		 yadj = NA_REAL; */
3158
		 yadj = NA_REAL; */
3163
	    angle = 0;
3159
	    angle = 0;
3164
	    yadj = 0;
-
 
3165
	}
3160
	}
3166
	break;
3161
	break;
3167
    case 4:
3162
    case 4:
3168
	if(las == 1 || las == 2) {
3163
	if(las == 1 || las == 2) {
3169
	    angle = 0;
3164
	    angle = 0;
3170
	    yadj = 0.5;
-
 
3171
	}
3165
	}
3172
	else {
3166
	else {
3173
	    /*   line = line + 1 - Rf_gpptr(dd)->yLineBias;
3167
	    /*   line = line + 1 - Rf_gpptr(dd)->yLineBias;
3174
		 angle = 90;
3168
		 angle = 90;
3175
		 yadj = NA_REAL; */
3169
		 yadj = NA_REAL; */
3176
	    line = line + 1;
3170
	    line = line + 1;
3177
	    angle = 90;
3171
	    angle = 90;
3178
	    yadj = 0;
-
 
3179
	}
3172
	}
3180
	break;
3173
	break;
3181
    }
3174
    }
3182
    GMathText(at, line, coords, str, xadj, yadj, angle, dd);
3175
    GMathText(at, line, coords, str, xadj, yadj, angle, dd);
3183
}/* GMMathText */
3176
}/* GMMathText */