Changeset 1899 in Sophya for trunk/SophyaPI/PI/psfile.cc
- Timestamp:
- Feb 13, 2002, 12:03:15 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/psfile.cc
r1898 r1899 946 946 fprintf(mPSFile, "gs %.2f Ux %.2f Uy m (%s) S gr\n", x, y, s) ; 947 947 else { 948 unsigned long txtdir = pos & PI_TextDirection; 948 949 int posh = pos & PI_HorizontalPosition; 949 950 int posv = pos & PI_VerticalPosition; 951 int angle = 0; 952 if (txtdir == PI_TextDirectionVerticalUp) angle = -90; 953 else if (txtdir == PI_TextDirectionVerticalDown) angle = 90; 954 950 955 if ((posh == PI_HorizontalLeft) && 951 ((posv == PI_VerticalBaseLine) || (posv == 0)) ) 952 fprintf(mPSFile, "gs %.2f Ux %.2f Uy m (%s) hlshstr gr\n", 953 x, y, s) ; 956 ((posv == PI_VerticalBaseLine) || (posv == 0)) ) { 957 if (angle == 0) 958 fprintf(mPSFile, "gs %.2f Ux %.2f Uy m (%s) hlshstr gr\n", 959 x, y, s) ; 960 else 961 fprintf(mPSFile, "gs %.2f Ux %.2f Uy m %d rotate (%s) hlshstr gr\n", 962 x, y, angle, s) ; 963 } 954 964 else { 955 965 char ssvp = 'b'; … … 960 970 else sshp = 'l'; 961 971 } 962 if (posv == 0) 963 fprintf(mPSFile, "gs %.2f Ux %.2f Uy m (%s) h%cshstr gr\n", 964 x, y, s, sshp) ; 972 if (posv == 0) { 973 if (angle == 0) 974 fprintf(mPSFile, "gs %.2f Ux %.2f Uy m (%s) h%cshstr gr\n", 975 x, y, s, sshp) ; 976 else fprintf(mPSFile, "gs %.2f Ux %.2f Uy m %d rotate (%s) h%cshstr gr\n", 977 x, y, angle, s, sshp) ; 978 } 965 979 else { 966 980 if (posv == PI_VerticalCenter) ssvp = 'c'; … … 968 982 else ssvp = 'b'; 969 983 } 970 fprintf(mPSFile, "gs %.2f Ux %.2f Uy m (%s) h%cv%cshstr gr\n", 984 if (angle == 0) 985 fprintf(mPSFile, "gs %.2f Ux %.2f Uy m (%s) h%cv%cshstr gr\n", 971 986 x, y, s, sshp, ssvp) ; 987 else 988 fprintf(mPSFile, "gs %.2f Ux %.2f Uy m %d rotate (%s) h%cv%cshstr gr\n", 989 x, y, angle, s, sshp, ssvp) ; 972 990 } 973 991 }
Note:
See TracChangeset
for help on using the changeset viewer.