Or no fill, to be exact.
I don't want my ovals filled. Do I have to write a function to
make this happen, or am I missing something?
I don't want my ovals filled. Do I have to write a function to
make this happen, or am I missing something?
SetGraphicsDriver GLMax2DDriver() Graphics 800, 600 glPolygonMode GL_FRONT_AND_BACK, GL_LINE DrawOval 100, 100, 200, 50 DrawRect 200, 200, 200, 50 glPolygonMode GL_FRONT_AND_BACK, GL_FILL Flip WaitKeyBut I don't know of a way to do it in DirectX.
Graphics 400,400,0 Const PixSize=1 Const RadiusX=100 Const RadiusY=70 Const PosX=200 'center Const PosY=200 'center Local Rad:Float 'draw the circle---------------------------- For Rad = 0 To 360 Step .1 'step is the definition of the circle DrawRect PosX + (Sin(Rad) * RadiusX)-PixSize/2, PosY + (Cos(Rad) * RadiusY)-PixSize/2,PixSize,PixSize; Next '------------------------------------------- SetColor 0,255,0 DrawLine PosX-10,PosY,PosX+10,PosY DrawLine PosX,PosY-10,PosX,PosY+10 Flip WaitKey()
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