Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Thu 14/02/2008 20:57:04

Title: clear surface makes my bg go violet!
Post by: on Thu 14/02/2008 20:57:04
DrawingSurface *surface = Room.GetDrawingSurfaceForBackground();
      surface.Clear();
      surface.Release();


When I run that my background is istantly washed in pink colour. I just to want to remove whatever rawdraw* action i did until now, not covering the bg. Any hint?
Title: Re: clear surface makes my bg go violet!
Post by: Pumaman on Thu 14/02/2008 21:11:32
RawDrawing is permanent until the player leaves the screen. If you want to be able to undo it, you need to use the DrawingSurface.CreateCopy method to create a backup copy before you start, and then use DrawSurface later to restore it.
Title: Re: clear surface makes my bg go violet!
Post by: on Thu 14/02/2008 21:24:04
Quote from: Pumaman on Thu 14/02/2008 21:11:32
RawDrawing is permanent until the player leaves the screen. If you want to be able to undo it, you need to use the DrawingSurface.CreateCopy method to create a backup copy before you start, and then use DrawSurface later to restore it.


Enlightening. I respectfully bow to you, mighty creator. Thank you!