Re: Unable to Hue (DirectDraw)
  Home FAQ Contact Sign in
microsoft.public.win32.programmer.directx.graphics only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Unable to Hue (DirectDraw)         

Group: microsoft.public.win32.programmer.directx.graphics · Group Profile
Author: Trammel
Date: Feb 28, 2008 06:49

"Trammel" Server.com> wrote in message
news:q0pxj.143179$LD6.129158@fe3.news.blueyonder.co.uk...
> Anyone know how the hue "control" in DirectDraw works?
> I've tried the following but havent been able to get it working:
>
>
> 'Create sprite from bitmap
> '-- A blank SurfaceDescription suffices.
> sprite = New Surface("c:\test.bmp", New SurfaceDescription,
> GraphicsCard)
>
> 'Make all black areas of the sprite transparent
> '--You can specify a color, but it defaults to black
> Dim ck As ColorKey
> sprite.SetColorKey(ColorKeyFlags.SourceDraw, ck)
>
> 'Set a hue
> '-- Anywhere from 180 to -180
> Dim ccoHue As ColorControlObject = New ColorControlObject
> ccoHue.Hue = 100
>
> 'Try applying the hue to the sprite
> Dim ccHue As ColorControl
> Try
> 'Doesnt work
> ccHue = New ColorControl(sprite)
> Catch
> Beep()
> End Try
> Try
> 'Doesnt work
> ccHue.ColorControls = ccoHue
> Catch
> Beep()
> End Try

Update:
I keep finding the following information on the web and in a book that I
bought on DirectX coding:

"Next you make a call to IDIRECTDRAWCOLORCONTROL::SetColorControl(), and the
primary surface will be immediately modified. The changes will remain in
effect until you make
another call." - Tricks of the Game Programming Gurus, Andr
no comments
diggit! del.icio.us! reddit!