Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

line()

Purpose

Draw a line

Description

Draw a line between two points in the specified colour

Syntax

line( point1, point2, colour )

Arguments

point1 screen coordinates of first point in pixels { x, y }

point2 screen coordinates of second point in pixels { x, y}

colour colour name or RGB values { red, green, blue, opacity } between 0 and 1

Example

// Draw 100 random lines
clear()
for i = 1 to 100 loop
    point1 = { random( gWidth() ), random( gHeight() ) }
    point2 = { random( gWidth() ), random( gHeight() ) }
    col = { random( 101 ) / 100, random( 101 ) / 100, random( 101 ) / 100, random( 101 ) / 100 }
    line( point1, point2, col )
    update()
repeat

// Wait 10 seconds
sleep( 10 )

Associated Commands

box(), circle(), triangle()

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.