hi,
it would be possible to add a function in library 2DDrawing :
Arc(x, y, Radius, StartAngle, EndAngle [, Color])
x, y Specifies the position of the center pixel of the ARC.
Radius Specifies the radius of the ARC.
StartAngle Specifies Angle of departure
EndAngle Specifies end angle
Color (optional) Specifies the color to be used for the ARC.
optionally the direction of rotation (clockwise / counterclockwise)
Best regards
ARC Drawing
ARC Drawing
Windows 10 x64/86 - PB 5.73LTS (x86 & x64)
_________________________________________
~English is not my native language I'm using a translator~
_________________________________________
~English is not my native language I'm using a translator~
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: ARC Drawing
For now: Extra 2d Shapes
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: ARC Drawing
thank you IdeasVacuum
purpose is limited to windows. why not a function for every OS

purpose is limited to windows. why not a function for every OS


Windows 10 x64/86 - PB 5.73LTS (x86 & x64)
_________________________________________
~English is not my native language I'm using a translator~
_________________________________________
~English is not my native language I'm using a translator~
-
- Addict
- Posts: 1310
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
Re: ARC Drawing
Hi
I am using PB 5.4 vectordrawing commands to draw an arc as you ask. If you take a look at this http://www.purebasic.fr/english/viewtop ... +Module%3A you can draw an arc as specified.
The programme asks for the start\anchor point of the arc and then draws a circle which revolves around the anchor point and changes size\position with the mouse moves. This allows you to set the position and radius of the desired arc. A full circle is used here to show all possible arcs from that point. Once clicked you are asked to set the start angle of the arc and again after setting i.e. clicking the left mouse button you set the end angle in a clockwise direction again using the mouse. Once happy with the end angle click the mouse again and the arc is drawn.
With this it is possible to draw an arc anywhere on your drawing area.
Hope it helps
Regards
CD
I am using PB 5.4 vectordrawing commands to draw an arc as you ask. If you take a look at this http://www.purebasic.fr/english/viewtop ... +Module%3A you can draw an arc as specified.
The programme asks for the start\anchor point of the arc and then draws a circle which revolves around the anchor point and changes size\position with the mouse moves. This allows you to set the position and radius of the desired arc. A full circle is used here to show all possible arcs from that point. Once clicked you are asked to set the start angle of the arc and again after setting i.e. clicking the left mouse button you set the end angle in a clockwise direction again using the mouse. Once happy with the end angle click the mouse again and the arc is drawn.
With this it is possible to draw an arc anywhere on your drawing area.
Hope it helps
Regards
CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
-
- Addict
- Posts: 1310
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
Re: ARC Drawing
Hi
It does use the canvas gadget the whole drawing surface is a canvas gadget, it needs a lot of the mouse commands.
It does use the canvas gadget the whole drawing surface is a canvas gadget, it needs a lot of the mouse commands.

Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
-
- Addict
- Posts: 1310
- Joined: Fri Aug 28, 2015 6:10 pm
- Location: Portugal
Re: ARC Drawing
Is it just me or does that look very similar to the AddPathCircle vector command?Arc(x, y, Radius, StartAngle, EndAngle [, Color])
Code: Select all
AddPathCircle(x.d, y.d, Radius.d [, StartAngle.d, EndAngle.d [, Flags]])
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
- BasicallyPure
- Enthusiast
- Posts: 539
- Joined: Thu Mar 24, 2011 12:40 am
- Location: Iowa, USA
Re: ARC Drawing
Until the time it becomes a feature in PureBasic you can draw arcs like this.
Arc(x, y, start.f, finish.f, radius.f, color = 0, mode = 0)
Arc(x, y, start.f, finish.f, radius.f, color = 0, mode = 0)
BasicallyPure
Until you know everything you know nothing, all you have is what you believe.
Until you know everything you know nothing, all you have is what you believe.