line

line( )

Description
Draws a line

Syntax
line(x1, y1, x2, y2) 

Parameters
  x1 : int x-coordinate of first point
  y1 : int y-coordinate of first point

  x2 : int x-coordinate of second point
  y2 : int x-coordinate of second point

Usages
Draw a line of coodinates (x1, y1) to (x2, y2)

line(100, 100, 200, 200)


Examples in arduino

#include "AppGosu.h"
AppGosu app;

void  setup() {
     app.start();
     app.clearAll();
     
     app.stroke(255, 255, 255);   // white
     app.line(100, 100, 300, 300);

     app.stroke(255,255,0);   // red
     app.line(100, 200, 300, 400);

}
void loop() {

}



Examples in other MCU 


printf("line(100,100,300,300);");
     
















by  AppGosu
-----------------------------------------

No comments: