GetCameraWidth
Width = GetCameraWidth(CameraIndex)
 
Parameters:

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

    Width = The Width of this cameras viewport
 

      GetCameraWidth returns the Width of a cameras view port.


FACTS:


      * Cameras Width & Height are taken from the cameras viewport settings.



Mini Tutorial:


      This example creates a screen/window, then creates a camera and displays the cameras Width and Height. As you can see, a camera when created will inherits the size of the surface, it's been attached to.


  
; Open a Screen (windowed) to a size of 500x by 400y
  OpenScreen 500,400,16,1
  
; CReate a Camera
  CreateCamera 1
  
; Read this cameras X & Y Positions
  Print "Cameras Width:"+Str$(GetCameraWidth(1))
  Print "Cameras Height:"+Str$(GetCameraHeight(1))
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



This example would output.

  
  Cameras Width: 500.0
  Cameras Height: 400.0
  


 
Related Info: CameraViewPort | GetCameraHeight | GetCameraStatus | GetCameraSurface | GetCameraViewPortX1 | GetCameraViewPortX2 | GetCameraViewPortY1 | GetCameraViewPortY2 :
 


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