Drawing using indexed colors?

Drawing using indexed colors?

Post by Benno Puet » Fri, 17 May 1996 04:00:00



I've been trying to draw to an indexed color device setting my
screen to 256 colors (BTW, how would I do this in my program?), but
I have not been able to find a drawing command that uses the index
color, rather than an RGB argument.

Can I specify the drawing color through it's index, if so, how?

--
Benno Puetz
Communications Research Laboratory      Tel: +81 - (0)423-27-6068            
4-2-1 Nukui Kita-machi                  Fax: +81 - (0)423-27-6905
Koganei, Tokyo 184   JAPAN

 
 
 

Drawing using indexed colors?

Post by Bruce Hou » Mon, 20 May 1996 04:00:00



> I've been trying to draw to an indexed color device setting my
> screen to 256 colors (BTW, how would I do this in my program?), but
> I have not been able to find a drawing command that uses the index
> color, rather than an RGB argument.

> Can I specify the drawing color through it's index, if so, how?

If you're being nice and using he Palette manager to get your chosen
256 colours onscreen, then use pmForeColor.

If you're not being nice and using the palette manager, then just
blast your desired CLUT index into the appropriate byte of RAM
(baseAddr + y*(rowBytes&0x3fff + x) yourself.

-- Bruce

 
 
 

1. access color index instead of RGB

I would like to use bit-logic on index entries of an indexed
video-device (256 colors) to do some palette animation.
In QickDraw there seems to be support just for monochrome
devices and a sophisticated way choosing the index entries
indirectly using there RGB-value they refer to.

Any ideas how to directly OR or XOR the index value of a pixel?

------------------><--------------------------------------------

Doctoral Program in Cognitive Science      University of Hamburg
-------> Address: Vogt-Koelln-Str. 30 22527 Hamburg <-----------
------------> Tel.: ++49 40 5494 2528 Fax: 2385 <---------------
http://www.informatik.uni-hamburg.de/GRK/Personen/Jens/Jens.html
------------------------------------------><--------------------

2. ADSL & exchange, can it work with no ISP?

3. How to match Pixmap index to color table

4. Where is SAMBA?

5. Pushing color indexes directly into a PixMap?

6. I/O mapped memory

7. PixelFormat for 8-bit indexed color?

8. Engineering openings - Allstates Design & Dev

9. Using [] to index from a pointer. Help!

10. How to draw char in color

11. Offscreen drawing in color dialogs

12. Coloured Xor drawing?

13. RGB color drawing in rectangles etc.