![]() |
| | #1 |
| Registered User Join Date: Mar 2002
Posts: 88
| Transparent Draw Question 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 | |
| | #2 |
| Used Registerer 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 | |
| | #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 | |
| | #4 |
| Used Registerer 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 | |
| | #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 | |
| | #6 |
| Used Registerer 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 | |
![]() |
| Thread Tools | |
| Display Modes | |
|
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 |