The R Project SVN R

Rev

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

Rev 17179 Rev 18202
Line 2907... Line 2907...
2907
    ReferenceY = y;
2907
    ReferenceY = y;
2908
    GConvert(&ReferenceX, &ReferenceY, coords, INCHES, dd);
2908
    GConvert(&ReferenceX, &ReferenceY, coords, INCHES, dd);
2909
    if (R_FINITE(xc))
2909
    if (R_FINITE(xc))
2910
	CurrentX = ReferenceX - xc * bboxWidth(bbox);
2910
	CurrentX = ReferenceX - xc * bboxWidth(bbox);
2911
    else
2911
    else
-
 
2912
	/* Paul 11/2/02
-
 
2913
	 * If xc == NA then should centre horizontally.
-
 
2914
	 * Used to left-adjust.
-
 
2915
	 */
2912
	CurrentX = ReferenceX;
2916
	CurrentX = ReferenceX - 0.5 * bboxWidth(bbox);
2913
    if (R_FINITE(yc))
2917
    if (R_FINITE(yc))
2914
	CurrentY = ReferenceY + bboxDepth(bbox)
2918
	CurrentY = ReferenceY + bboxDepth(bbox)
2915
	    - yc * (bboxHeight(bbox) + bboxDepth(bbox));
2919
	    - yc * (bboxHeight(bbox) + bboxDepth(bbox));
2916
    else
2920
    else
-
 
2921
	/* Paul 11/2/02
-
 
2922
	 * If xc == NA then should centre vertically.
-
 
2923
	 * Used to bottom-adjust.
-
 
2924
	 */
2917
	CurrentY = ReferenceY;
2925
	CurrentY = ReferenceY + bboxDepth(bbox)
-
 
2926
	    - 0.5 * (bboxHeight(bbox) + bboxDepth(bbox));
2918
    CurrentAngle = rot;
2927
    CurrentAngle = rot;
2919
    rot *= M_PI_2 / 90 ;/* radians */
2928
    rot *= M_PI_2 / 90 ;/* radians */
2920
    CosAngle = cos(rot);
2929
    CosAngle = cos(rot);
2921
    SinAngle = sin(rot);
2930
    SinAngle = sin(rot);
2922
    RenderElement(expr, 1);
2931
    RenderElement(expr, 1);
Line 2977... Line 2986...
2977
	if(las == 2 || las == 3) {
2986
	if(las == 2 || las == 3) {
2978
	    angle = 90;
2987
	    angle = 90;
2979
	    yadj = 0.5;
2988
	    yadj = 0.5;
2980
	}
2989
	}
2981
	else {
2990
	else {
2982
	    line = line + 1 - Rf_gpptr(dd)->yLineBias;
2991
	    /*	    line = line + 1 - Rf_gpptr(dd)->yLineBias;
-
 
2992
		    angle = 0;
-
 
2993
		    yadj = NA_REAL; */
-
 
2994
	    line = line + 1;
2983
	    angle = 0;
2995
	    angle = 0;
2984
	    yadj = NA_REAL;
2996
	    yadj = 0;
2985
	}
2997
	}
2986
	break;
2998
	break;
2987
    case 2:
2999
    case 2:
2988
	if(las == 1 || las == 2) {
3000
	if(las == 1 || las == 2) {
2989
	    angle = 0;
3001
	    angle = 0;
2990
	    yadj = 0.5;
3002
	    yadj = 0.5;
2991
	}
3003
	}
2992
	else {
3004
	else {
2993
	    line = line + Rf_gpptr(dd)->yLineBias;
3005
	    /*	    line = line + Rf_gpptr(dd)->yLineBias;
-
 
3006
		    angle = 90;
-
 
3007
		    yadj = NA_REAL; */
2994
	    angle = 90;
3008
	    angle = 90;
2995
	    yadj = NA_REAL;
3009
	    yadj = 0;
2996
	}
3010
	}
2997
	break;
3011
	break;
2998
    case 3:
3012
    case 3:
2999
	if(las == 2 || las == 3) {
3013
	if(las == 2 || las == 3) {
3000
	    angle = 90;
3014
	    angle = 90;
3001
	    yadj = 0.5;
3015
	    yadj = 0.5;
3002
	}
3016
	}
3003
	else {
3017
	else {
3004
	    line = line + Rf_gpptr(dd)->yLineBias;
3018
	    /*   line = line + Rf_gpptr(dd)->yLineBias;
-
 
3019
		 angle = 0;
-
 
3020
		 yadj = NA_REAL; */
3005
	    angle = 0;
3021
	    angle = 0;
3006
	    yadj = NA_REAL;
3022
	    yadj = 0;
3007
	}
3023
	}
3008
	break;
3024
	break;
3009
    case 4:
3025
    case 4:
3010
	if(las == 1 || las == 2) {
3026
	if(las == 1 || las == 2) {
3011
	    angle = 0;
3027
	    angle = 0;
3012
	    yadj = 0.5;
3028
	    yadj = 0.5;
3013
	}
3029
	}
3014
	else {
3030
	else {
3015
	    line = line + 1 - Rf_gpptr(dd)->yLineBias;
3031
	    /*   line = line + 1 - Rf_gpptr(dd)->yLineBias;
-
 
3032
		 angle = 90;
-
 
3033
		 yadj = NA_REAL; */
-
 
3034
	    line = line + 1;
3016
	    angle = 90;
3035
	    angle = 90;
3017
	    yadj = NA_REAL;
3036
	    yadj = 0;
3018
	}
3037
	}
3019
	break;
3038
	break;
3020
    }
3039
    }
3021
    GMathText(at, line, coords, str, xadj, yadj, angle, dd);
3040
    GMathText(at, line, coords, str, xadj, yadj, angle, dd);
3022
}/* GMMathText */
3041
}/* GMMathText */