Skip to main content
gamedev.net
🔒 Locked

basic drawing on a dx surface

Started by redmonkey Nov 12, 2000 at 3:49 PM 1 replies 350+ views
Original Post
redmonkey
redmonkey
im drawing a radar, (from scratch) for my game''s hud. but as i want it to look good () i want some transparency, and fadeyness towards the edge, (and a swirly bit as the radar goes round) but there arent any routines i can find for drawing ellipses[only rects] with transparency. i was thinking, i can just draw it onto another surface or dib and then draw that on top (with transparency) but im finding it suprisingly hard to do that. i tried creating a directdrawsurface and drawing that onto the maing game''s surface, but alas, i couldnt find how to create it properly. a tdib wont seem to work, and icant use a regular tbitmap. help! __________________ graham "red" reeves. red@deadpenguin.org www.deadpenguin.org
__________________graham "red" reeves.[email=red@deadpenguin.org]red@deadpenguin.org[/email]www.deadpenguin.org
Sly
Sly
Are you using DelphiX or plain old DirectX? I''m not familiar with DelphiX, but with DirectX you set a color key for the source surface and then blit, telling it to use the source color key during the blit.



Steve ''Sly'' Williams
Tools Developer
Krome Studios
Dan Condon-Jones
Dan Condon-Jones
That''s a bit of a buggery that one...

As far as I can tell, DrawAlpha, DrawRotateAlpha etc only work with TPictureCollectionItems, but you can''t manipulate that in any way (that I''ve found). You can store the images in Bitmaps or DIBs, and display them using BitBlt, but then you don''t get any alpha effects.

For the game I''m writing I wound up writing a piece of code to go round each pixel one by one and and set the colour accordingly. I can send you the code if you like, but it''s not a pretty site, and very likely not very portable.

Dan

Dan Condon-Jones
----------------------------------------
If you like Julian Gollop''''s Chaos, visit http://www.retrospec.co.uk/dan/turmoil/
Dan Condon-Jones----------------------------------------If you like Julian Gollop''s Chaos, visit http://www.retrospec.co.uk/dan/turmoil/

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.