|
-
December 17th, 1999, 07:50 AM
#1
Using palettes
I am programming an application that needs a palette filled with shades of red.
I have tried the following lines of code :
For i = 0 To 255
Pal.palPalEntry(i).peRed = i
Pal.palPalEntry(i).peGreen = 0
Pal.palPalEntry(i).peBlue = 0
Pal.palPalEntry(i).peFlags = 0
Next i
hPal = CreatePalette(Pal)
hHoldPrevPal = SelectPalette(Form1.hdc, hPal, True)
RealizePalette (Form1.hdc)
RealizePalette has returned a value of 249.
While trying all shades of red, from RGB(0,0,0) to RGB(255,0,0) , I could get only 4 distinct shades of red,
with all the others dithered.
Thanks for any help,
Gino.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|