[comp.sys.mac.programmer] yet Another Question

mcdonald@fornax.UUCP (Ken Mcdonald) (03/08/90)

Just the most recent in a long line of stupid questions . . .

I'm trying to use TextBox() to draw "grayed out" text, by first
making a call to PenPat(gray).  Since the text is still black, I
surmise TE doesn't bother looking at the GrafPort's pen to determine
is drawing characteristics.  Question--is there and easy way to
draw gray text within a box?  (I imagine DrawString would do the
graying, but IM says it doesn't bound to a rect.)

Thanks,
Ken McDonald
{mcdonald@cs.sfu.ca}
PS.  Thanks to all the people out there in netland who have given me
answers, often very valuable indeed, to various previous questions.  I
don't have time to reply personally, but you know who you are.

ml10+@andrew.cmu.edu (Michael A. Libes) (03/09/90)

>I'm trying to use TextBox() to draw "grayed out" text, by first
>making a call to PenPat(gray).  Since the text is still black, I
>surmise TE doesn't bother looking at the GrafPort's pen to determine
>is drawing characteristics.  Question--is there and easy way to
>draw gray text within a box?  (I imagine DrawString would do the
>graying, but IM says it doesn't bound to a rect.)

1) Draw the Text normally
2) set PenPat(gray)
3) set PenMode(patBic) /* maybe its notPatBic */
4) do a PaintRect()

Using different modes will produce slightly different results.

    - Luni

awd@dbase.A-T.COM (Alastair Dallas) (03/09/90)

The round corners of buttons are circles with a diameter 1/2 the 
height of the button, I believe.  (Disassembly long long ago.)

To draw gray text, draw the text and then overlay-fill a gray pattern.
(This has been asked and answered _a lot_.)

Hope it helps.

/alastair/

Steve.Ihde@f421.n109.z1.fidonet.org (Steve Ihde) (03/10/90)

> I'm trying to use TextBox() to draw "grayed out" text, by first
> making a call to PenPat(gray).  Since the text is still black, I
> surmise TE doesn't bother looking at the GrafPort's pen to determine
> is drawing characteristics.  Question--is there and easy way to
> draw gray text within a box?  (I imagine DrawString would do the
> graying, but IM says it doesn't bound to a rect.)
 
Let the text be drawn normally, then PenPat(gray), PenMode(patBic) 
--that's BIt Clear--then PaintRect(itemRect), itemRect being the 
itemRect of the item you want grayed if it's in a dialog box, or just a 
Rect enclosing the text.


--  

	Steve Ihde at The Black Cat's Shack (Fidonet 1:109/401)
	Internet:  Steve.Ihde@f421.n109.z1.fidonet.org    
	UUCP:      ...!uunet!blkcat!421!Steve.Ihde

gabler@oakhill.UUCP (Christopher Gabler) (03/20/90)

I am in the process of writing a device driver for a General Purpose Interface Bus card
in a Mac II.  The operating system used is A/UX 1.0. I have purchased the APDA A/UX Device
Drivers Kit and several supportive documents on Apple hardware and Unix programming.

I have had many difficulties using the present resources and I am interested in getting
help in programming the driver and correctly installing it in the A/UX kernel. I would like to 
hire someone on a contract basis to do some programming on this project.  This person should
have considerable experience in writing and testing device drivers in the A/UX environment (UNIX
experience is NOT enough).

ctg

+++++++++++++++++++++++++++++++++
Christopher Gabler              +
Motorola Inc.                   +
MS OE28                         +
6501 Wm. Cannon Drive West      +
Austin, Texas  78735-8598       +
(512) 891-3313                  +
+++++++++++++++++++++++++++++++++