FastDot3
FastDot3 Xpos, Ypos, RgbColour1, RgbColour2, RgbColour3
 
Parameters:

    Xpos = The X coordinate of the dot
    Ypos = The Y coordinate of the dot
    RgbColour1 = The Rgb Colour of first dot
    RgbColour2 = The Rgb Colour of second dot
    RgbColour3 = The Rgb Colour of third dot
Returns: NONE
 

     FastDot3 draws a pair of pixels to the current surface starting at the users selected coordinate, with the second and third pixels to the right of the first. Making it a shortcut situations that require brute force pixel rendering.


      Example:

  
; Draws a triplet of pixels
  FastDot3 Xpos,Ypos, ThisColour1,ThisColour2,ThisColour3
  
;Is the same as this code
  FastDot Xpos  ,Ypos, ThisColour1
  FastDot Xpos+1,Ypos, ThisColour2
  FastDot Xpos+2,Ypos, ThisColour3
  





FACTS:


      * FastDot3 has all the same limitations as the FastDot


 
Example Source: Download This Example
; -----------------------------------------
; PRESS SPACE TO CHANGE TESTS
; -----------------------------------------
  
  
  Fill_Method=0
  
  
  Do
     
     Cls RGB(00,0,0)
     
     
     Select Fill_Method
         Case 0
             Fill_Screen_FastDot(Fill_Colour)
             
         Case 1
             Fill_Screen_FastDot2(Fill_Colour)
             
         Case 2
             Fill_Screen_FastDot3(Fill_Colour)
             
         Case 3
             Fill_Screen_FastDot4(Fill_Colour)
             
     EndSelect
     
     
     Fill_Colour+=GetScreenWidth()
     
     
     If SpaceKey()
        Fill_Method=(Fill_Method+1And 3
        FlushKeys
     EndIf
     
     
     Sync
  Loop
  
  
  
  
  
  
  
  
  
  
Function Fill_Screen_FastDot(ThisColour)
  
  Width= GetScreenWidth()-1
  
  LockBuffer
  ThisRgb=Point(0,0)
  
  For ylp= 0 To GetScreenHeight()-1
     
     // Fill Strip of pixels manually
     For xlp= 0 To Width
        FastDot xlp,ylp,ThisColour
     Next
     ThisColour=ThisColour + Width
  Next
  
  UnLockBuffer
  
  PrintMethod("FastDOT")
  
EndFunction
  
  
  
  
Function Fill_Screen_FastDot2(ThisColour)
  
  Width= GetScreenWidth()-1
  
  LockBuffer
  ThisRgb=Point(0,0)
  
  For ylp= 0 To GetScreenHeight()-1
     
     // Fill Strip of pixels manually in pairs
     For xlp= 0 To Width Step 2
        FastDot2 xlp,ylp,ThisColour,ThisColour
     Next
     ThisColour=ThisColour + Width
     
  Next
  
  UnLockBuffer
  
  PrintMethod("FastDOT2")
  
EndFunction
  
  
  
  
  
Function Fill_Screen_FastDot3(ThisColour)
  
  Width= GetScreenWidth()-1
  LockBuffer
  ThisRgb=Point(0,0)
  
  For ylp= 0 To GetScreenHeight()-1
     
     // Fill Strip of pixels manually in pairs
     For xlp= 0 To ((Width/3)*3)-1 Step 3
        FastDot3 xlp,ylp,ThisColour,ThisColour,ThisColour
     Next
     
     
     // Fill Left Overs on this row
     For xlp= xlp To Width
        FastDot xlp,ylp,ThisColour
     Next
     
     ThisColour=ThisColour + Width
     
  Next
  
  UnLockBuffer
  
  PrintMethod("FastDOT3")
  
EndFunction
  
  
  
  
Function Fill_Screen_FastDot4(ThisColour)
  
  Width= GetScreenWidth()-1
  
  LockBuffer
  ThisRgb=Point(0,0)
  
  For ylp= 0 To GetScreenHeight()-1
     
     // Fill Strip of pixels manually in quads
     For xlp= 0 To Width Step 4
        FastDot4 xlp,ylp,ThisColour,ThisColour,ThisColour,ThisColour
     Next
     ThisColour=ThisColour + Width
     
  Next
  
  UnLockBuffer
  
  PrintMethod("FastDOT4")
  
EndFunction
  
  
  
Function PrintMethod(Method$)
  
  Message$="Fill Screen("+Method$
  Message$+=":" +Str$(FPS())+")"
  Message$+=" Press Space"
  Print Message$
  
EndFunction
  
  
  
  
  
 
Related Info: Box | Circle | DotC | FastDot | FastDot2 | FastDot4 | FastPoint | GetInk | Ink | Line | LockBuffer | Point | Tri | UnLockBuffer :
 


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