home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!utcsri!explorer.dgp!rodney
- Newsgroups: comp.sys.sgi
- From: rodney@explorer.dgp (Rodney Hoinkes)
- Subject: More Strangeness with 4.0.5 FM
- Message-ID: <1992Nov21.153913.11291@jarvis.csri.toronto.edu>
- Organization: Centre for Landscape Research, University of Toronto
- Date: 21 Nov 92 20:39:13 GMT
- Lines: 68
-
- No, 4.0.5 FM is NOT a new system release, it just means
- 4.0.5(a-f) FM (Font Manager).
-
- I, as many other people, got hit by the fmfreefont behaviour
- of 4.0.5 and the new Font Manager. I am also now experiencing
- some other strangeness when it comes to rotating text. This
- code works under IRIX 3.3.2-4.0.4 but dies if the text is
- rotated!
-
- Can anyone see the problem? I seem to be stumped by this.
-
- DrawTextWindow(PELEMENT *e) {
- int x1, y1, x2, y2;
- int width;
- double m[3][2];
- fmfonthandle f,fsized;
-
- x1 = e->x1;
- y1 = e->y1;
- x2 = e->x2;
- y2 = e->y2;
-
- if(x1 < 0) x1 = 0; if(y1 < 0) y1 = 0;
- if(x2 > machine.maxX) x2 = machine.maxX;
- if(y2 > machine.maxY+1) y2 = machine.maxY+1;
-
- cpack(cardtitle[e->index].col);
- if (editmode) recti(x1,y1,x2,y2);
-
- f = fmfindfont(fntname[cardtitle[e->index].font]);
- fsized = fmscalefont(f,cardtitle[e->index].size);
- if(cardtitle[e->index].rot != 0.0) {
- fmgetpagematrix(m);
- fmrotatepagematrix((double)cardtitle[e->index].rot);
- }
- fmsetfont(fsized);
- if(cardtitle[e->index].align == 1) {
- width = fmgetstrwidth(fsized,cardtitle[e->index].string);
- cmov2i((machine.maxX-width)/2,y1);
- } else {
- cmov2i(x1,y1);
- }
- fmprstr(cardtitle[e->index].string);
- if(cardtitle[e->index].rot != 0.0) {
- fmsetpagematrix(m);
- }
- fmfreefont(fsized);
- fmfreefont(f);
-
- }
-
- It dies on the fmptrstr. I know the string and index are valid.
-
- Please no flames about my fmfindfonts and fmfreefonts, as that
- is how the code currently works (designed before 4.0.5 FMisms).
-
- If anyone sees the problem, please let me know.
-
-
- Rodney Hoinkes
- Head of Design Applications
- Centre for Landscape Research
- University of Toronto
- Tel: (416) 978-7197
- Email: rodney@dgp.utoronto.ca
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- APIAWWGATI
- "Anything's possible IF and WHEN we get around to it."
-