LineC
LineC X1, Y1, X2, Y2, Colour
 
Parameters:

    X1 = The starting X coordinate of the line
    Y1 = The starting Y coordinate of the line
    X2 = The ending X coordinate of the line
    Y2 = The ending Y coordinate of the line
    Colour = The colour of this line in RGB format
Returns: NONE
 

      LineC draws a coloured line of pixels to the current surface (screen or image). The line is drawn between two coordinates. The first is the starting coordinate and second the ending coordinate. The line will connect these points. Unlike Line however, the colour of the pixels is specified by the command, so the pixels will be drawn in a user selected colour.



FACTS:


      * LineC does not effect the current INK colour, and is drawn using the current InkMode

      * LineC 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.

      * Lines outside of the surface area (screen or image) it will be clipped to with the viewport area of the surface.






Mini Tutorial:


      Drawing some coloured lines 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 StartX
     StartX=Rnd(100)
     
   ; get a random number between 0 and 100
   ; and place it in the variable StartY
     StartY=Rnd(100)
     
     
   ; get a random number between 0 and 100
   ; and place it in the variable EndX
     EndX=Rnd(100)
     
   ; get a random number between 0 and 100
   ; and place it in the variable EndY
     EndY=Rnd(100)
     
   ; draw a line to the screen in a random
   ; INK colour
     
     LineC StartX,StartY,EndX,EndY,RndRGB()
  Next
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  



 
Related Info: Box | Dot | GetSurface | GouraudStripH | GouraudStripV | Ink | InkAlpha | InkMode | Line | LockBuffer | RGB | TextureStripH | TextureStripV :
 


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