CopyStripH
CopyStripH SrcSurface, SrcY, SrcX1, SrcX2, DestSurface, DestX, DestT
 
Parameters:

    SrcSurface = The Source Surface (image or Screen) to copy from
    SrcY = The source strip Y coordinate
    SrcX1 = The source strip X (Left) coordinate
    SrcX2 = The source strip X (Right) coordinate
    DestSurface = The Destination Surface (image or Screen) to copy to
    DestX = The destination strip X (Left) coordinate
    DestT = The destination strip Y (Left) coordinate
Returns: NONE
 

      CopyStripH copies a horizontal strip of pixels from one graphics surface to another. This command can be used to copy between various surface combinations ie. screen->screen, Image->Screen, Screen->Image or Image->Image


      Surfaces

           0 = Screen
           1 or above = Image




FACTS:


      * CopyStripH destination will be clipped to the destination surfaces viewport.




Mini Tutorial:




  
  
  
  
; get the screen size
  sw=GetScreenWidth()
  sh=GetScreenHeight()
  
  
; Create a variable called size an assign this variable the value 256.
  Size=256
; Create a image using the Ball and size variables
  CreateImage 1,Size,Size
  
; get the image size
  iw=GetImageWidth(1)
  ih=GetImageHeight(1)
  
  
; Render a phong map styled shading to the image
  RenderPhongImage 1,iw/2,ih/2,$ff7fff,200,2.0
  
  
  scale#=1
  scaledir#=0.01
  Do
     Cls RGB(0,0,0)
     
   ; Copy a vertical strip of pixels from the image #1
   ; to Image #0 (the screen)
     For lp =0 To iw-1
        destY#=lp*Scale#
        CopyStripV  1,lp,0,ih,0,10+destY#,50
     Next
     
     
   ; Copy a horizontal strip of pixels from the image #1
   ; to Image #0 (the screen)
     For lp =0 To ih-1
        destY#=lp*Scale#
        CopyStripH 1,lp,0,iw,0,10,50+desty#
     Next
     
     
     Scale#=Scale#+ScaleDir#
     
     If Scale#>3 Then ScaleDir#=ScaleDir#*-1
     If Scale#<1 Then ScaleDir#=ScaleDir#*-1
     
     
     x=10
     y=50
   ; Copy section of he Screen (0) to the screen
     CopyRect 0,x,y,x+iw,y+ih,0,(sw/2),(sh/2)
     
     
     Sync
  Loop
  
  




 
Related Info: CopyImage | CopyRect | CopyStripV :
 


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