DrawOval, with less filling

BlitzMax Forums/BlitzMax Beginners Area/DrawOval, with less filling

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Thanks all, but for now I'll just include this handy little graphics module I wrote.
Const NORMAL = 0
Const DOTTED = 1
Function drawEllipse(x,y,xSize,ySize,StepSize = 20, width=1, style = NORMAL)
	Local oldlinewidth = GetLineWidth(), dot = 1
	SetLineWidth width
	Local a = stepSize
	Repeat
		If dot DrawLine x+xSize*Sin(a), y+ySize*Cos(a),x+xSize*Sin(a-stepSize), y+ySize*Cos(a-stepSize)
		a:+stepSize
		If DOTTED dot = 1-dot
	Until a> 360
	SetLineWidth oldlinewidth
EndFunction


Const FILL = 3
Const LINE = 2
Const CORNERS = 1
Const BOX = 0

Function drawl(x1,y1,x2,y2,width=1,style = BOX)
	Local oldlinewidth = GetLineWidth()
	SetLineWidth width
	Select style
	Case 3
		DrawRect x1,y1,x2,y2
	Case 2
		x2:+x1
		y2:+y1
		DrawLine x1,y1,x2,y2
	Case 1
		x2:+x1
		y2:+y1
		DrawLine (x1,y1,x1+(x2-x1)*.1,y1)
		DrawLine (x1,y1,x1,y1+(y2-y1)*.1)
		DrawLine (x1,y2-(y2-y1)*.1,x1,y2)
		DrawLine (x1,y2,x1+(x2-x1)*.1,y2)
		
		DrawLine (x2,y1,x2-(x2-x1)*.1,y1)
		DrawLine (x2,y1,x2,y1+(y2-y1)*.1)
		DrawLine (x2,y2-(y2-y1)*.1,x2,y2)
		DrawLine (x2,y2,x2-(x2-x1)*.1,y2)
	Default
		x2:+x1
		y2:+y1
		DrawLine (x1,y1,x2,y1)
		DrawLine (x1,y1,x1,y2)
		DrawLine (x1,y2,x2,y2)
		DrawLine (x2,y1,x2,y2)
	EndSelect
	SetLineWidth oldlinewidth
End Function