Dot
Dot Xpos, Ypos
 
Parameters:

    Xpos = The X coordinate of the dot
    Ypos = The Y coordinate of the dot
Returns: NONE
 

      Dot draws a single pixel to the current surface. This surface will either be the Screen or an Image. The colour of the pixel is not specified by the user, rather the command will draw the Dot in the current INK colour.





FACTS:


      * Dot draws the pixel in the current INK colour and InkMode. PlayBASIC sets the default INK colour to RGB(255,255,255). Which you can change at any time.

      * Dot will render to the current surface, except when the user has either CaptureToScene, or CaptureToWorld are activated. In either situation the render request will be added to the scene or world queues.

      * Drawing lots of Dots to the screen or an image can be pretty slow. The reason for this, is that each time you draw a single dot, the surface your drawing to first be locked, the pixel is drawn and then be unlocked again. The locking is required to ensure that the surface is valid, which is controlled by the OS, can be very slow. See LockBuffer + UnLockbuffer + FastDot if you have a problem.





Mini Tutorial:


      This examples shows how you would use the Dot commands to draw pixels to the screen.

  
  
; start a For/loop that will loop 100 times
  For lp =1 To 100
     
   ; get a random number between 0 and 100 and place it in the variable X
     x=Rnd(100)
     
   ; get a random number between 0 and 100 and place it in the variable Y
     y=Rnd(100)
     
   ; draw a dot to the screen.  The Dot will be drawn in the current INK
   ; colour
     Dot x,y
     
  Next
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



 
Related Info: Box | Circle | DotC | FastDot | FastPoint | GetInk | Ink | Line | LockBuffer | Point | Tri | UnLockBuffer :
 


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