Blame demo/src/drawing.c

ba9f06
ba9f06
#include <math.h></math.h>
ba9f06
ba9f06
#include <helianthus.h></helianthus.h>
ba9f06
ba9f06
#include "drawing.h"
ba9f06
ba9f06
ba9f06
ba9f06
void drawingInit() {
ba9f06
	background("yellow");
ba9f06
}
ba9f06
ba9f06
ba9f06
void drawingDraw() {
ba9f06
	double x = 512;
ba9f06
	double y = 512 - 64;
ba9f06
	
0b65e7
	strokeWeight(20);
ba9f06
	
ba9f06
	fill("red"); stroke("blue");
ba9f06
	rect(x, y, 48*2, 48);
ba9f06
	x += 48*2 + 16;
ba9f06
	
0b65e7
	fill("#C71585AA"); stroke("0 0 1 0.5");
ba9f06
	ellipse(x, y, 48*2, 48);
ba9f06
	x += 48*2 + 16;
ba9f06
	
ba9f06
	fill("green"); stroke("magenta");
ba9f06
	regularPolygon(x + 24, y + 24, 6, 48);
ba9f06
	x += 64;
ba9f06
	
ba9f06
	stroke("brown");
ba9f06
	point(x, y);
ba9f06
	stroke("cyan");
ba9f06
	line(x, y + 48, x + 48, y);
ba9f06
	stroke("brown");
ba9f06
	arc(x, y, 48, 48, 0, 90);
ba9f06
	x += 64;
ba9f06
	
ba9f06
	stroke("gray");
ba9f06
	moveTo(x, y + 24);
ba9f06
	arcPath(x, y, 48, 48, 180, 360);
ba9f06
	lineTo(x + 48, y + 48);
ba9f06
	lineTo(x, y + 48);
ba9f06
	strokePath();
ba9f06
	x += 64;
ba9f06
	
ba9f06
	fill("blue"); stroke("transparent");
ba9f06
	moveTo(x, y + 24);
ba9f06
	arcPath(x, y, 48, 48, 180, 360);
ba9f06
	lineTo(x + 48, y + 48);
ba9f06
	lineTo(x, y + 48);
ba9f06
	lineTo(x + 24, y + 24);
ba9f06
	closePath();
ba9f06
	stroke("black");
ba9f06
}
ba9f06
ba9f06