DotC
DotC Xpos, Ypos, Colour
 
Parameters:

    Xpos = The X coordinate of the dot
    Ypos = The Y coordinate of the dot
    Colour = The Colour of the pixel in RGB format
Returns: NONE
 

      DotC draws a single coloured pixel (dot) to the current surface. This surface will be either Screen or an Image. Unlike DOT, the colour of the pixel is specified by the command and will be drawn in that colour.



FACTS:


      * DotC does not effect the current INK colour, but is drawn using the current InkMode

      * DotC 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:


      Drawing some pixels on 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 coloured dot to the screen using the
   ; RndRGB() command to select a random RGB colour
   ; for this pixel.
     DotC x,y,RndRGB()
     
  Next
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



 
Related Info: Dot | FastDot | FastPoint | InkMode | LockBuffer | Point | UnLockBuffer :
 


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