Jump to content

Drawing a circle from the center?


Recommended Posts

Is there any way to draw a circle with a given point as the center? Seem like such a simple thing to do, but all of the present ways I can think of require such precision it's almost silly. I should be able to just click the point, drag out a radius, and bingo, a circle centered on a point.

Link to comment
Share on other sites

back on Nov 16 2007 boltBait answered this one for us

workaround

quoted per BoltBait

OK, here's how you can do it:

Add a new layer. On that layer...

Use the Gradient Tool with Radial Gradient . You can then draw the circle as you described (from center to outer edge).

Magic wand the transparent area with a tolerance of 0. Invert your selection (Ctrl-I) and press the backspace key (flood fill).

Feather as necessary. Wipe hands on pants.

_________________

Link to comment
Share on other sites

Or you can do it the very mathematical way:

1. Create your circle on a completely new layer. Write down the bounding rectangle size.

2. Multiply the width by 1/2. This is the radius.

3. Subtract the radius from the two coordinates you want your image at. This is your new coordinate pair

4. Now use the magic wand to select your circle.

5. Now using the Move Pixels tool, move your circle until the upper left coordinates match your new coordinate pair.

6. Put your calculator away.

signature.png

Link to comment
Share on other sites

Or you can do it the very mathematical way:

1. Create your circle on a completely new layer. Write down the bounding rectangle size.

2. Multiply the width by 1/2. This is the radius.

3. Subtract the radius from the two coordinates you want your image at. This is your new coordinate pair

4. Now use the magic wand to select your circle.

5. Now using the Move Pixels tool, move your circle until the upper left coordinates match your new coordinate pair.

6. Put your calculator away.

Yes, this is the way I usually do it, and without a calculator too! :o

It is pretty effective (although BoltBait's method is quite ingenious as well)

Call me expired. Please.

th_Energyv2.png

Don't go counting your chickens before the pack of rabid ravaging foxes attacks. -Sozo
Link to comment
Share on other sites

It would be nice as a plug-in, yes.

Seems to me that you could use the control key to center create an object. Control-shift would be for circles and squares.

Shouldn't be that hard.

I'm not sure if a plugin can do that, it's up to Rick.

Ctrl key is a good idea. Go well with a drop down menu option.

And never say: Shouldn't be that hard.

The_next_thousand_words_by_0_ASH_0.png

All creations Ash + Paint.NET [ Googlepage | deviantArt | Club PDN | PDN Fan ]

Link to comment
Share on other sites

And never say: Shouldn't be that hard.

Shouldn't be that hard :D

It seems to be as simple as sticking a few lines of code into the method

protected override PdnGraphicsPath CreateShapePath(PointF[] points)

which is part of

PaintDotNet.Tools.EllipseTool

code removed, see below instead

(Code not actually checked for correctness :D, and I could be missing something... )

Link to comment
Share on other sites

Shouldn't be that hard.

As I keep saying, every time someone says those words, Rick sighs, dies a little inside, and wonders, "Why-oh-why didn't I take the blue pill?..."

 

The Doctor: There was a goblin, or a trickster, or a warrior... A nameless, terrible thing, soaked in the blood of a billion galaxies. The most feared being in all the cosmos. And nothing could stop it, or hold it, or reason with it. One day it would just drop out of the sky and tear down your world.
Amy: But how did it end up in there?
The Doctor: You know fairy tales. A good wizard tricked it.
River Song: I hate good wizards in fairy tales; they always turn out to be him.

Link to comment
Share on other sites

I changed a few things so now....

CONTROL lets you do:

90182332pp1.jpg

and CONTROL + SHIFT forces it to be circular

Should I add the same for rectangles and rounded rectangles too?

[EDIT] Ok, you can now draw rectangles and rounded rectangles the same way

And could this get added into an official version or something? Possibly? :D

As I keep saying, every time someone says those words, Rick sighs, dies a little inside, and wonders, "Why-oh-why didn't I take the blue pill?..."

And it wasn't that hard :wink:

(It took longer to get the source code to compile properly than to figure out how to do this)

I wonder if there are any other small changes I could make....

Link to comment
Share on other sites

Maybe I am too simple minded but I use the paintbrush. I just turn the width way up, center my brush and click. Another thing I use is the polygon/star plugin. I turn the star depth all the way down and the veticies all the way up and use the size bar to change size and you can change the brush width. It renders centered. Another way I use is the spiro shapes plugin. It is a bit tricky. I turn the amplitude down and the vertices all the way up, tiling 0, steps 1, rays from the center and zoom changes the size. However with the spiro you don't get a smooth edge. I hope this helps. I have never needed to have an accurate radius.

 

"One can't complain. I have my friends. Someone spoke to me only yesterday." EEYORE

Link to comment
Share on other sites

  • toe_head2001 changed the title to Drawing a circle from the center?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...