GetCameraViewPortX2
Xpos = GetCameraViewPortX2(CameraIndex)
 
Parameters:

    CameraIndex = The Index of the Camera that you wish to read from
Returns:

    Xpos = The Bottom right Hand X coordinate of the cameras view port
 

      CameraViewPortX2 returns the bottom right hand coordinate of a cameras viewport.



FACTS:


      * None



Mini Tutorial:


      This example creates a camera, adjusts it size to a custom view port, then displays this information.


  
  
; create camera 1.  Which will attach itself to
; the screen
  CreateCamera 1
  
; Set the Cameras View port area to 100x,150y to 200x,250y
  CameraViewPort 1,100,150,200,250
  
; Display this cameras view port coordinates.
  Print "Camera Viewport X1:"+Str$(GetCameraViewPortX1(1))
  Print "Camera Viewport Y1:"+Str$(GetCameraViewPortY1(1))
  Print "Camera Viewport X2:"+Str$(GetCameraViewPortX2(1))
  Print "Camera Viewport Y2:"+Str$(GetCameraViewPortY2(1))
  
  
; Show the user the screen.
  Sync
  
; wait for a key press, before ending
  WaitKey
  
  



This example would output.

  
  Camera Viewport X1:100
  Camera Viewport Y1:150
  Camera Viewport X2:200
  Camera Viewport Y2:250
  


 
Related Info: CameraViewPort | GetCameraHeight | GetCameraViewPortX1 | GetCameraViewPortY1 | GetCameraViewPortY2 | GetCameraWidth :
 


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