Welcome to Pauls PureProject
 Home Online Reference Guide duplicated from http://cvs.purebasic.com  
 Online Resources
   · Reference

 Libraries
     2DDrawing
     Billboard
     Camera
     CDAudio
     Cipher
     Clipboard
     Console
     Database
     Date
     Desktop
     Engine3D
     Entity
     File
     FileSystem
     Font
     Gadget
     Help
     Image
     ImagePlugin
     Joystick
     Keyboard
     Library
     Light
     LinkedList
     Material
     Math
     Memory
     Menu
     Mesh
     Misc
     Module
     Mouse
     Movie
     Network
     OnError
     Packer
     Palette
     Particle
     Preference
     Printer
     Requester
     Sort
     Sound
     SoundPlugin
     Sprite
     Sprite3D
     StatusBar
     String
     SysTray
     Terrain
     Texture
     Thread
     Toolbar
     Window

 Line

Syntax

Line(x, y, Width, Height [, Color])
Description
Draw a line of given dimensions on the current output. If the 'Color' parameter is not specified, the default color set with FrontColor() will be used. RGB() can be used to get a valid color value. The current output is set with StartDrawing().

Example:
  ; Several lines in random colors
  Width  = 220
  Height = 150
  If OpenWindow(0, 0, 0, Width, Height, #PB_Window_SystemMenu|#PB_Window_ScreenCentered, "Lines")
    If StartDrawing(WindowOutput())
      yStart = 0
      yEnd   = Height-yStart
      xStart = 10
      For xEnd=xStart To Width-xStart Step 1
        Line(xStart, yStart, xEnd, yEnd ,RGB(Random(255),Random(255),Random(255))) 
      Next
      StopDrawing() ; This is absolutely needed when the drawing operations are finished !!! Never forget it !
    EndIf
    
    Repeat : EventID = WaitWindowEvent() : Until  EventID = #PB_Event_CloseWindow
  EndIf

Supported OS

Windows, Linux, AmigaOS

<- FrontColor() - 2DDrawing Index - LineXY() ->



Hosted by Reel Media Productions Copyright©2001-2004 All Rights Reserved