Article View: comp.sys.amiga.tech
Article #8324Re: Text()
From: Chuck McManis
Date: Sat, 12 Mar 1988 01:29
Date: Sat, 12 Mar 1988 01:29
25 lines
1420 bytes
1420 bytes
In article <247@ritcv.UUCP> msl5864@ritcv.UUCP (Michael S. Leibow) writes:
>If I can't do that, is there any way to draw the characters into a bitmap
>(not visible) and extract the parts that I need from the bitmap into the
>windows RastPort?
Yes, and it works quite well. You initialize a RastPort and a BitMap
structure, then use AllocRaster() to get some memory (it doesn't have
to be full size, just large enough to hold your text) and then render
your text into it. Something like ...
/* Done from memory so don't quote me on it ... */
InitRastPort(&rp);
InitBitMap(&bm,20,20,1);
bm.Planes[0] = AllocRaster(RASSIZE(20,20));
rp.BitMap = &bm;
MyFont = OpenDiskFont(SomeFontAttr);
SetFont(rp,MyFont);
Move(rp,0,rp->TxBaseline);
Text(rp,"A",1);
You now have a mini bitmap with an "A" in it...
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses, but you knew that didn't you.
Technical Details
Message-ID:
<45204@sun.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!bellcore!decvax!mcnc!uvaarpa!umd5!ames!oliveb!sun!pepper!cmcmanisReferences:
<247@ritcv.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!bellcore!decvax!mcnc!uvaarpa!umd5!ames!oliveb!sun!pepper!cmcmanis From: cmcmanis%pepper@Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: Text() Message-ID: <45204@sun.uucp> Date: 12 Mar 88 01:29:51 GMT References: <247@ritcv.UUCP> Sender: news@sun.uucp Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 25