InkAlpha
InkAlpha AlphaLevel#
 
Parameters:

    AlphaLevel# = The Alpha Blending level of pen based graphics rendering
Returns: NONE
 

      InkAlpha changes the level of Alpha Blending between pen based graphics and the surface they're being drawn upon. This setting, only takes effect when InkMode is set to AlphaBlending mode.



Alpha Level Ranges (0.0 to 1.0)

0.00 = Blend is completely the background
0.25 = Blend is 75% background and 25% foreground
0.50 = Blend is 50% back and foreground
0.75 = Blend is 75% foreground and 25% background
1.00 = Blend is completely the foreground





FACTS:


      * InkAlpha ONLY takes effect when InkMODE is set to Alpha Blending.

      * Since drawing is performed by the CPU, these effects can be fairly slow when operating upon video memory. So we recommend using these features mainly when drawing to FX/AFX images, which will be much faster! See (CreateFXIMage and read the Images tutorial )




Mini Tutorial:


      Using Inkmode to cross fade some circle graphics with the background.

  
  
  Do
   ; Clear the Screen to Black (rgb(0,0,0) is black)
     Cls RGB(0,0,0)
     
   ; Set the INK mode to NORMAL
     InkMode 1
     BoxC 100,100,200,200,1,$ff2233
     
   ; set the InkMode to AlhaBlend
     InkMode 1+16
     
   ; set the InkAlpha (the blend level)
     InkAlpha 0.5+(Cos(angle#)*0.4)
     
   ; Draw Circle the at mouse position
     Circle MouseX(),MouseY(),25,1
     
   ; Change the angle value to make the Fade effect cycle in and out
     angle#=WrapAngle(angle#,1)
     
     
   ; Display the Screen and wait for the user to press a key
     Sync
  Loop
  
  


      If you run this example and move the Circle over the Box, you should be able to see the circle/box through each other.

 
Related Info: Box | Dot | Ellipse | Images | Ink | InkMode | Line | Quad | RGB | Tri :
 


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