BlitImageClear
BlitImageClear ThisImage, Xpos, Ypos, ClsColour
 
Parameters:

    ThisImage = The Index of the image you wish to draw
    Xpos = The X coordinate to draw this image
    Ypos = The Y coordinate to draw this image
    ClsColour = The RGB Colour to clear this surface with after it's been drawn
Returns: NONE
 


     BlitImageClear is similar to the DrawImage function, except it has post processing. What it does, is it draws your selected image, but it also clears the image to a selected colour while drawing. So it's a combination of the DrawImage & CLS.

      The combined processing is not just to save you a few lines of code, it's actually a more optimal way of performing this action.


FACTS:

     * BlitImageClear is only intend for drawing FX & AFX formatted surfaced.

     * BlitImageClear doesn't support mask & alpha channel transparency.



 
Example Source: Download This Example
; Inlude the Blit Image functions
  #Include "BlitImage"
  
  
; Create an FX image the size of the screen
  MyImage=NewFXImage(GetScreenWidth(),GetScreenHeight())
  
  
; Start of Demo loop
  Do
     
   ; redirect all drawing to this image
     RenderToImage MyImage
     
     
   ; Set the Ink mode drawing pen to ALPHA 50 (50% blend)
     InkMode 1+32
     
   ; draw a circle at the mouses current position
     Circle MouseX(),MouseY(),100
     
   ; redirect all drawing to screen back buffer
     RenderToScreen
     
   ; To do combined Blit (copy) our Image, with combined CLS of image.
   ; to the PB screen
     BlitImageClear(MyImage,0,0,RGB(100,50,100))
     
     
   ; Display Message
     Text 0,0,"Using BlitImageClear to draw MyImage with Clearing"
     
   ; flip the back buffer to the front, so the user can see it
     Sync
     
  Loop
  
  
 
Related Info: DrawAlphaImage | DrawImage :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com