Blob Blame Raw

#include <math.h>

#include <helianthus.h>

#include "drawing.h"



void drawingInit() {
	background("yellow");
}


void drawingDraw() {
	pushDrawingState();

	double x = 512;
	double y = 512 - 64;
	
	strokeWeight(20);
	
	fill("red"); stroke("blue");
	rect(x, y, 48*2, 48);
	x += 48*2 + 16;
	
	fill("#C71585AA"); stroke("0 0 1 0.5");
	ellipse(x, y, 48*2, 48);
	x += 48*2 + 16;
	
	fill("green"); stroke("magenta");
	regularPolygon(x + 24, y + 24, 6, 48);
	x += 64;
	
	stroke("brown");
	point(x, y);
	stroke("cyan");
	line(x, y + 48, x + 48, y);
	stroke("brown");
	arc(x, y, 48, 48, 0, 90);
	x += 64;
	
	stroke("gray");
	moveTo(x, y + 24);
	arcPath(x, y, 48, 48, 180, 360);
	lineTo(x + 48, y + 48);
	lineTo(x, y + 48);
	strokePath();
	x += 64;
	
	fill("blue"); stroke("transparent");
	moveTo(x, y + 24);
	arcPath(x, y, 48, 48, 180, 360);
	lineTo(x + 48, y + 48);
	lineTo(x, y + 48);
	lineTo(x + 24, y + 24);
	closePath();

	popDrawingState();
}