C Board  

Go Back   C Board > Platform Specific Boards > Windows Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 05-05-2002, 01:31 PM   #1
Registered User
 
Join Date: Mar 2002
Posts: 88
Transparent Draw Question

if i whant to do an animation
and i use transparent draw

now i need to erase the picture before

so how do i do it??


(SOry AbOuT mY eNgLiSh)


eaxplanation:

i draw a picture then i erase this picture and draw another in different position
so in transparend draw how do i do it

Last edited by GodLike; 05-05-2002 at 01:35 PM.
GodLike is offline   Reply With Quote
Old 05-05-2002, 09:06 PM   #2
Used Registerer
 
jdinger's Avatar
 
Join Date: Feb 2002
Posts: 1,065
You didn't mention what graphics library you're using so I'm going to give a general answer. Blit a copy of the background (using the same size/position of the RECT of the transparent sprite) in it's place.

Oh and using really annoying capitilization on a "sorry if this is hard to read" apology nullifies the apology.
jdinger is offline   Reply With Quote
Old 05-06-2002, 09:55 AM   #3
Registered User
 
Join Date: Mar 2002
Posts: 88
i did like that before

but if i do it like this its erase all at this position

mot only the picture i want
GodLike is offline   Reply With Quote
Old 05-06-2002, 02:02 PM   #4
Used Registerer
 
jdinger's Avatar
 
Join Date: Feb 2002
Posts: 1,065
I'm sorry but I'm having a real hard time understanding what you're getting at. I understand that english isn't your first language so I'm going to try to help fill in some of the blanks for you. I'll tell you what I'm assuming and you tell me where I'm right or wrong then I'll be able to better explain it to you.

Here's what I gather from what you've typed so far:

You have a background image.
You have a transparent sprite.
When your sprite moves you want to redraw the part of the background where the sprite moved FROM.

Is this correct?
jdinger is offline   Reply With Quote
Old 05-07-2002, 03:26 AM   #5
Registered User
 
Join Date: Mar 2002
Posts: 88
yeah
something like this

but it can be not only a background
it can be another transparent spirite
or another picture
GodLike is offline   Reply With Quote
Old 05-07-2002, 06:56 AM   #6
Used Registerer
 
jdinger's Avatar
 
Join Date: Feb 2002
Posts: 1,065
Try using an additional offscreen surface (this will work with any graphics library). Blit everything to this backbuffer, the background, sprites, etc.. Blit the backbuffer to the main surface. When something changes, blit only the part of the backbuffer that is affected by the change to update the main surface (ie: dirty rectangles).
jdinger is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
another do while question kbpsu C++ Programming 3 03-23-2009 12:14 PM
Direct3D quick question hoAx C++ Programming 4 03-13-2008 04:52 AM
Allegro Question.. o0obruceleeo0o Game Programming 3 07-01-2003 01:10 PM
opengl DC question SAMSAM Game Programming 6 02-26-2003 09:22 PM
question about DLL's and class functions btq Windows Programming 2 02-25-2003 06:08 AM


All times are GMT -6. The time now is 03:33 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22