# Draw an arc from the center of a box outwards

**URL:** <https://forum.juce.com/t/draw-an-arc-from-the-center-of-a-box-outwards/17943>\
**Category:** General JUCE discussion\
**Created:** [June 3, 2016, 7:50am UTC](https://forum.juce.com/t/draw-an-arc-from-the-center-of-a-box-outwards/17943 "2016-06-03T07:50:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehsanen](https://avatars.discourse-cdn.com/v4/letter/e/f07891/32.png) [@ehsanen](https://forum.juce.com/u/ehsanen)\
**Post date:** [June 3, 2016, 7:50am UTC](https://forum.juce.com/t/draw-an-arc-from-the-center-of-a-box-outwards/17943/1 "2016-06-03T07:50:32Z")

</div>

Hi,  
I am trying to draw an arc shape path which starts from the center outwards, but no matter how much I try the arc always begins from (0, 0) point. I tried with “addArc” and “addCentredArc” with different input parameters but it always just starts from (0, 0). I need to show just a portion of a graphic that is inside an arc so I am doing something like this:

> 1. 
> 
> ```
> outlineArc.addCentredArc(50, 50, 50, 50, 1, 1.57, 3.14, true);
> 
> ```
> 
> 2. 
> 
> ```
> outlineArc.addArc(50, 50, 50, 50, 1.57, 3.14, false);
> 
> ```
> 
> 3. 
> 
> ```
> g.reduceClipRegion(outlineArc);
> 
> ```
> 
> 4. 
> 
> ```
> g.fillAll(Colours::yellow);
> 
> ```

I use line 1 OR 2 not both together, and here for the sake of simplicity I am just filling the Clip region with a colour. I need different angles but in this example it goes from 90 Degree to 180 Degree.  
There is a 100\*100 square, and I want the arc to start at the center of the box outwards.

Thanks for the helps in advance.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [June 3, 2016, 8:14am UTC](https://forum.juce.com/t/draw-an-arc-from-the-center-of-a-box-outwards/17943/2 "2016-06-03T08:14:03Z")

</div>

Adding an arc will make it continue from the last point in the path. For a path that begins from the start of the arc, you’d need to startNewSubPath from that point before continuing with the arc itself.

---

<div class="post-metadata">

**Author:** ![ehsanen](https://avatars.discourse-cdn.com/v4/letter/e/f07891/32.png) [@ehsanen](https://forum.juce.com/u/ehsanen)\
**Post date:** [June 3, 2016, 8:21am UTC](https://forum.juce.com/t/draw-an-arc-from-the-center-of-a-box-outwards/17943/3 "2016-06-03T08:21:24Z")

</div>

Perfect, that solved the problem. Thanks!
