ScrollImage
ScrollImage ImageNumber, ScrollX, ScrollY
 
Parameters:

    ImageNumber = The index identifier of this image
    ScrollX = The distance to move pixels along the X axis
    ScrollY = The distance to move pixels along the Y axis
Returns: NONE
 

      ScrollImage moves the pixels within an image. Any scrolled pixels that move off an edge of the image will wrap around. You can scroll the image in any direction you like using the ScrollX and ScrollY controls.



FACTS:


      * Scrollimage with wrap pixels the scrolled off either edge back on the opposite edge.

      * Scrollimage is not recommended to create scrolling backdrops. It's generally best to create such an effect by tiling the image.



 
Example Source: Download This Example
; ==================================================================
;  ScrollIMage  (convert a colour image to black and white)
; ==================================================================
  
; Create a variable called size an assign this variable the value 256.
  Size=240
  
; Create a new image of size and return it's handle into the ball variable
  Ball=NewImage(Size,Size)
  
; Render a purple colour phong map styled shading to the image
  RenderPhongImage Ball,size/2,size/2,$ff04ff,Size*0.9,2.0
  
  
  
  Do
     Cls RGB(30,25,40)
     
   ; Calc the center of the sreen
     scx=(GetScreenWidth()/2)
     scy=(GetScreenHeight()/2)
     
   ; Render Our Created image to the  screen
     DrawImage ball,scx-size/2,scy-size/2,1
     CenterText scx,scy,"Scrolling Image"
     
   ;  Scroll the Pixel Data through the IMage.
     ScrollImage Ball,2,2
     
   ; Display the Screen and loop back to the Do statement to continue.
     Sync
  Loop
  
 
Related Info: FadeImage | GrayScaleImage | ImageViewPort | LightImage | NewFxImage | NewImage | TileImage :
 


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