Index
<- Raster

BlitFadeRaster

BlitFadeRaster(<-x <-y <-list <-width <-startAlpha <-endAlpha <-time)

Description

Blits a list of colors to the raster. The list will be treated as a flattened array mapping to a rectangular 'sprite' that is 'width' wide. The blit will happen at the specified location in the raster and the bottom left of the sprite will start at that location. The startAlpha, endAlpha, and time control how the fade out will occur. Unlike BlitRaster, this routine will continue to draw into the raster each from for 'time' frames. The color of each pixel in the list will have its alpha value tweened between startAlpha and endAlpha over time.

Examples

once
   V4(1 0 0 1) ->red
	  V4(0 0 0 1) ->black
	  V4(1 1 1 1) ->white
	  V4(0 1 0 1) ->green
 
	  CreateList ->square
	  do(25 0)
		  <-black ->square[I]
	  loop
 
	  ShowRaster(true)
endonce
 
ClearRaster(V4(RandFloat RandFloat RandFloat 1))
if (GetGameUpdateCount 150 % eq0)
   BlitFadeRaster(GetRandMapCell <-square 5 1 0 60) #Show a square once every 5 seconds. Each will fade out over 2 seconds.
endif

Index