mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-28 17:20:22 +00:00
Samples for Processing language, changes to languages.yml
This commit is contained in:
@@ -950,6 +950,11 @@ Pure Data:
|
||||
color: "#91de79"
|
||||
lexer: Text only
|
||||
primary_extension: .pd
|
||||
|
||||
Processing:
|
||||
type: programming
|
||||
color: "#2779ab"
|
||||
primary_extension: .pde
|
||||
|
||||
Python:
|
||||
type: programming
|
||||
|
||||
36
samples/Processing/hello.pde
Normal file
36
samples/Processing/hello.pde
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Shape Primitives.
|
||||
*
|
||||
* The basic shape primitive functions are triangle(),
|
||||
* rect(), quad(), ellipse(), and arc(). Squares are made
|
||||
* with rect() and circles are made with ellipse(). Each
|
||||
* of these functions requires a number of parameters to
|
||||
* determine the shape's position and size.
|
||||
*/
|
||||
|
||||
void setup() {
|
||||
size(640, 360);
|
||||
background(0);
|
||||
noStroke();
|
||||
}
|
||||
|
||||
void draw() {
|
||||
fill(204);
|
||||
triangle(18, 18, 18, 360, 81, 360);
|
||||
|
||||
fill(102);
|
||||
rect(81, 81, 63, 63);
|
||||
|
||||
fill(204);
|
||||
quad(189, 18, 216, 18, 216, 360, 144, 360);
|
||||
|
||||
fill(255);
|
||||
ellipse(252, 144, 72, 72);
|
||||
|
||||
fill(204);
|
||||
triangle(288, 18, 351, 360, 288, 360);
|
||||
|
||||
fill(255);
|
||||
arc(479, 300, 280, 280, PI, TWO_PI);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user