On Jan 9, 2007, at 1:54 AM, Frank Condello wrote:
...have tried to eliminate these using a mask, but to date no
success.
Picture.Transparent is 1 bit transparency, hence the halo...
i.e on-or-off rather than degrees of transparency?
The trick is to only draw the text into the mask - e.g. Fill the
mask with white, then draw black text into the mask, then fill the
RGB picture with black (or whatever colour you want the final text
to be).
HTH!
Yes, it works!! (see code below) Now if I just understood
why....is the explanation somewhere in the docs for Picture?
Will this also eliminate similar halos around imported images? I
have also noticed these halos around TIFF's or PNG's imported into a
Picture and then drawn into another picture using g.drawPicture
(theImported, 0, 0).
Thanks again....
Mark Levinson, MD
Hutchinson, KS
p = new Picture (100, 20, 32)
p.mask.graphics.foreColor = &cFFFFFF 'white
p.mask.graphics.fillRect 0,0, p.mask.width, p.mask.height
p.mask.graphics.foreColor = &c000000 'black
p.mask.graphics.textFont = "System"
p.mask.graphics.textSize = 12
p.mask.graphics.drawString ("Thanks Frank!", 0, p.height - 6)
p.graphics.foreColor = &cFF0000 'red.... 'fill the
picture with the final color of the string
p.graphics.fillRect 0, 0, p.width, p.height
Canvas.paint event
g.drawPicture (p, 20, 80)
Many thanks......
Mrk
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>