MirrorImage
MirrorImage ImageNumber, MirrorX, MirrorY
 
Parameters:

    ImageNumber = The index identifier of this image
    MirrorX = A flag for mirroring the X axis
    MirrorY = A flag for mirroring the Y axis
Returns: NONE
 

      MirrorImage can effect the picture in an image horizontally, vertically or both combined




FACTS:


      * MirrorImage flips the actual pixel data of the image. If you'd like to draw the image flipped then see TextureQuad, ScaleSpriteXY which can both be used to render flipped images dynamically




 
Example Source: Download This Example
;=======================
; MirrorIMage Example
;=======================
  
; Create an Image of with a box and "Hello World" printed down it.
  CreateImage 1,100,100
  RenderToImage 1
  Cls RGB(50,20,60)
  BoxC 0,0,30,30,true,RGB(0,255,0)
  For  lp=0 To 100
     Print "hello world"
  Next
  
  
; Redirect all drawnig to the screen
  RenderToScreen
  
; Make 3 copies of the image #1 as images 2,3 and 4
  CopyImage 1,2
  CopyImage 1,3
  CopyImage 1,4
  
  
; Init our screen cordinates varaibles, these will hold where we'll
; draw our images
  x=250
  y=150
  
  
; Draw the Original image to the screen
  DrawImage 1,x,y,0
  
; Mirror image 2 on the X axis and draw it
  MirrorImage 2,1,0
  DrawImage 2,x+200,y,0
  
  
; Mirror image 3 on the Y axis and draw it
  MirrorImage 3,0,1
  DrawImage 3,x,y+200,0
  
; Mirror image 4 on the X & Y axis and draw it
  MirrorImage 4,1,1
  DrawImage 4,x+200,y+200,0
  
  CenterText GetScreenWidth()/2,GetScreenHeight()/2,"Mirror Image"
  
  
  Sync
  WaitKey
  
 
Related Info: ScaleImage | ScaleSprite | ScrollImage | Sprites | TextureQuad :
 


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