[racket] More than one color with draw-text?

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Mon Dec 12 17:50:21 EST 2011

Take a look at

https://github.com/jeapostrophe/rl

particularly

https://github.com/jeapostrophe/rl/blob/master/ui/ui-world.ss

Jay

On Mon, Dec 12, 2011 at 8:53 AM, Will Robinson <quantum.penguin at gmail.com>wrote:

> Hello,
>
> I'm trying to do a simple Roguelike game as an exercise in learning the
> language, particularly racket/gui.  I'm using draw-text to place characters
> on the screen.  Ideally, I'd just call this once and put up huge string
> full of newlines to represent a block of text.  My problem is that I want
> to have control of the color of each character in this block of text.  It
> seems to me that the color controls for draw-text are applied to the entire
> block at once.  Should I just call draw-text for each character in the
> block, individually assigning color?  That seems to be very slow
> computationally, not to mention more work on the poor coder.
>
> Any advice is welcome.  Thank you!
>
> DocRob
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>



-- 
Jay McCarthy <jay at cs.byu.edu>
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

"The glory of God is Intelligence" - D&C 93
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20111212/7981f7b7/attachment.html>

Posted on the users mailing list.