ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/psign.c
(Generate patch)

Comparing ray/src/px/psign.c (file contents):
Revision 2.10 by greg, Tue Jul 7 18:24:34 1992 UTC vs.
Revision 2.11 by greg, Wed Jul 8 13:58:10 1992 UTC

# Line 117 | Line 117 | char  *argv[];
117                          break;
118                  case 'h':                       /* height of characters */
119                          cheight = atoi(argv[++an])*SSS;
120                        xsiz = xsiz = 0;
120                          break;
121                  case 'a':                       /* aspect ratio */
122                          aspect = atof(argv[++an]);
# Line 161 | Line 160 | makemap()                      /* create the bit map */
160          double  pictaspect;
161          
162          if (direct == 'r' || direct == 'l') {
163 <                if (xsiz == 0 || ysiz == 0) {
163 >                if (xsiz <= 0) {
164                          cwidth = cheight/aspect + 0.5;
165                          xsiz = (long)maxwidth*cwidth >> 8;
166                          ysiz = nlines*cheight;
167                  } else if (aspect > FTINY) {
168 +                        if (ysiz <= 0)
169 +                                ysiz = cheight*nlines;
170                          pictaspect = 256*nlines*aspect/maxwidth;
171                          if (pictaspect*xsiz < ysiz)
172                                  ysiz = pictaspect*xsiz + 0.5;
# Line 174 | Line 175 | makemap()                      /* create the bit map */
175                          cheight = ysiz/nlines;
176                          cwidth = cheight/aspect + 0.5;
177                  } else {
178 +                        if (ysiz <= 0)
179 +                                ysiz = cheight*nlines;
180                          pictaspect = (double)ysiz/xsiz;
181                          aspect = pictaspect*maxwidth/(256*nlines);
182                          cheight = ysiz/nlines;
183                          cwidth = cheight/aspect + 0.5;
184                  }
185          } else {                        /* reverse orientation */
186 <                if (xsiz == 0 || ysiz == 0) {
186 >                if (ysiz <= 0) {
187                          cwidth = cheight/aspect + 0.5;
188                          xsiz = nlines*cheight;
189                          ysiz = (long)maxwidth*cwidth >> 8;
190                  } else if (aspect > FTINY) {
191 +                        if (xsiz <= 0)
192 +                                xsiz = cheight*nlines;
193                          pictaspect = maxwidth/(256*nlines*aspect);
194                          if (pictaspect*xsiz < ysiz)
195                                  ysiz = pictaspect*xsiz + 0.5;
# Line 193 | Line 198 | makemap()                      /* create the bit map */
198                          cheight = xsiz/nlines;
199                          cwidth = cheight/aspect + 0.5;
200                  } else {
201 +                        if (xsiz <= 0)
202 +                                xsiz = cheight*nlines;
203                          pictaspect = (double)ysiz/xsiz;
204                          aspect = maxwidth/(256*nlines*pictaspect);
205                          cheight = xsiz/nlines;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines