FastDot4 |
FastDot4 Xpos, Ypos, RgbColour1, RgbColour2, RgbColour3, RgbColour4 |
|
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 RgbColour4 = The Rgb Colour of fourth dot
|
Returns: NONE |
|
FastDot4 draws a pair of pixels to the current surface starting at the users selected coordinate, with the second,third and fourth pixels to the right of the first. Making it a shortcut situations that require brute force pixel rendering.
Example:
; Draws a quad of pixels FastDot4 Xpos,Ypos, ThisColour1,ThisColour2,ThisColour3,ThisColour4 ;Is the same as this code FastDot Xpos ,Ypos, ThisColour1 FastDot Xpos+1,Ypos, ThisColour2 FastDot Xpos+2,Ypos, ThisColour3 FastDot Xpos+3,Ypos, ThisColour4 |
FACTS:
* FastDot4 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+1) And 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 |
|