Ellipse tool should display a tiny dot in the middle of the ellipse while drawing

Bug #481506 reported by Wolf on 2009-11-12
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Wishlist
Antonio Ospite

Bug Description

Quite often it is necessary to center a circle or an ellipse to a certain place. I'd love a tiny little dot in the middle of an ellipse while the drawing process is going on.

For the wishlist…

jazzynico (jazzynico) on 2009-11-12
Changed in inkscape:
importance: Undecided → Wishlist
tags: added: shape-editing ui
prkos (prkos) wrote :

When you click on an object twice to get the rotation arrows you also get a little cross at the center, and you can choose to snap it on the snapping toolbar. Does this solve your issue?

su_v (suv-lp) wrote :

@prkos - you only see the indicator of the rotation center when resizing/scaling or rotating/shearing with the selector tool, not when drawing a new ellipse using <Shift> to draw around the starting point. When the ellipse tool is active there is no visual indication where the center point of the selected circle/ellipse is.

Changed in inkscape:
status: New → Confirmed

> When you click on an object twice to get the rotation arrows you also
> get a little cross at the center, and you can choose to snap it on the
> snapping toolbar. Does this solve your issue?

o.k. - found what you mean.

It is a good workaround - but if you have to draw and center 100s of
circles, I'd prefer my suggestion, because each single circle would
need another three activities (F1 - click - F5)… - and we follow the
illusion using computers to save work, dont we? (-;

Greetings,

Wolf

su_v (suv-lp) wrote :

@Wolf - this is beyond bug tracker scope, but you do know about using 'Shift'+mouse-drag when creating new circles? And the starting-point (center-point) even snaps to whatever your snapping settings are: grid, nodes, guides… I see no need for repeated (<F1> - click - <F5>) to center new circles ;-)

The modifier is implemented for the rectangle tool and the ellipse tool, works with most on-canvas transformations (using the mouse to drag the handles) as well and is available in both 0.46 and 0.47(pre).

Wolf (drechsel) wrote :

> @Wolf - this is beyond bug tracker scope, but you do know about using
> 'Shift'+mouse-drag when creating new circles? And the starting-point
> (center-point) even snaps to whatever your snapping settings are:
> grid,
> nodes, guides… I see no need for repeated (<F1> - click - <F5>) to
> center new circles ;-)

Hello,

thanks for your thinking. In fact, what I was doing was different:

I duplicated the circles, and then shifted them. Old habit from
FreeHand and Super-Illu times. When doing that, a centering mark
would be helpful. - As well as when shifting around circles - it
would be nice if the little centering cross (much better than my idea
of a little circle) could be visible during shifting.

BTW.: This looks like a little inconvenience of the German version:
When pressing alt-D, the "Datei" (files) menu opens…
So producing clones doesnt work with keyboard shortcuts.

Greetings,

Wolf

>
> The modifier is implemented for the rectangle tool and the ellipse
> tool,
> works with most on-canvas transformations (using the mouse to drag the
> handles) as well and is available in both 0.46 and 0.47(pre).
>
> --
> Ellipse tool should display a tiny dot in the middle of the ellipse
> while drawing
> https://bugs.launchpad.net/bugs/481506
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Inkscape: A Vector Drawing Tool: Confirmed
>
> Bug description:
> Quite often it is necessary to center a circle or an ellipse to a
> certain place. I'd love a tiny little dot in the middle of an
> ellipse while the drawing process is going on.
>
> For the wishlist…

su_v (suv-lp) wrote :

You can have the midpoint marker displayed while shifting circles or other objects in Inkscape 0.47:

«other options can be found under the Snapping section of the Inkscape Preferences dialog:
  * Only snap the node closest to pointer: If this option is enabled, only one node is used as a snapping point on a target. This node will be highlighted as an object is dragged. Useful if an object has many snapping points. Note: if an object has too many nodes, and this option is disabled, a “convex hull” is used for snapping. »
<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Snapping.html#Snapping>

Please report back if this is what you are looking for or if you still think there's something missing when highlighting the active snapping point.

Antonio Ospite (ospite) wrote :

Hi, FWIW I too think that an ellipse SHAPE should have its center drawn, at least when the Ellipse tool is active, regardless of the position of the center of rotation of the ellipse OBJECT (which can be changed). After all a circle or an ellipse in SVG has a center by definition.

The snapping workarounds are generic and cool tho, just not very intuitive for newbies.

Antonio Ospite (ospite) wrote :

Ping.

I may try to come up with a pacth myself to draw the center of a circle/ellipse SHAPE, but I'd need some guidance as I don't know the Inkscape codebase at all.

Thanks,
   Antonio

Antonio Ospite (ospite) wrote :

I started to take a look at the code and AFAICS this can be done by adding a new knot entity of type CTRL_TYPE_POINT to ArcKnotHolder::ArcKnotHolder: something like an ArcKnotHolderEntityCenter to ui/object-edit.cpp, following what the 3D box does with it's "center" cross (Box3DKnotHolderEntityCenter)

For someone acquainted with the code it should be easy to implement, but it'll take me still some time to understand how all the pieces interact together; if someone would like to step up and anticipate me it'd be great.

Ciao,
   Antonio

Antonio Ospite (ospite) wrote :

OK, the attached patch seems to work for me.

It's my first Inkscape patch so I might overlooked some details, please tell me if that's the case.

And do you think that adding a translation control point also to the generic object transformation handles would make sense? (Similar to the rotation center but for translations)
And what about other shapes which are defined from a center point, like polygons?

Ciao,
   Antonio

jazzynico (jazzynico) on 2016-07-31
Changed in inkscape:
status: Confirmed → In Progress
milestone: none → 0.93
assignee: nobody → Antonio Ospite (ospite)
jazzynico (jazzynico) wrote :

Patch tested successfully on Windows XP (32-bit) with trunk rev. 15028.
Can't comment on the code quality, but at least there's no console message and it doesn't seem to introduce regressions.

Thanks for the patch!

Antonio Ospite (ospite) wrote :

Hi,

I am attaching the patch rebased on top of the latest code (March 29th, 2017) and it still works fine.
Can we have this merged please?

And, should we draw the center control point also for the other object types, especially the ones which define a center (Star, Spiral)?

I can take some screenshots or make a screencast of the before and after the patch, if needed.

Thanks,
   Antonio

Mc (mc...) wrote :

pushed to r15620, thanks for the patch!

Changed in inkscape:
status: In Progress → Fix Committed
Antonio Ospite (ospite) wrote :

Hi,

I am attaching a similar change for the Star shape too.

I am also evaluating if showing the center of rectangles and spirals would make sense too, for consistency.

Finally I'll see if showing the center of the bounding box for any selections (i.e. in src/seltrans.cpp) makes sense, for symmetry with the rotation center.

Any comment is welcome.

Ciao,
   Antonio

Antonio Ospite (ospite) wrote :

Attaching v2 of the change about stars, with some indentation fixed.

Patrick Storz (ede123) wrote :

I've not looked at the patch(es) yet, but when I want to use snapping to object centers I occasionally need some time to find the actual center, so a visual indicator is certainly something I'd support (for the default geometric shapes as well as any bounding box).

Antonio Ospite (ospite) wrote :

@Eduard, adding the control point for spirals and rectangles is easy, I'll post a patch after I figure out some details about my bzr workflow (namely, do merge-directives created with "bzr send" preserve the full commit message? And how are they applied?).

About adding the visual indicator for the center of the bounding box of selections, I think some minor refactoring to the current code is needed.

Right now, in src/seltrans.{h,cpp} the name SP_ANCHOR_CENTER is used to refer to the _rotation_ center, the one shown when the selection is in STATE_ROTATE.

What I am going to add is a control point for the center of the selection in STATE_SCALE.

So my doubt is: can I rename the current SP_ANCHOR_CENTER to something like SP_ANCHOR_ROTATION_CENTER? And then use SP_ANCHOR_CENTER for the bounding box center?

Thanks,
   Antonio

Patrick Storz (ede123) wrote :

@Antonio: Did you figure out your bzr workflow yet? (Not that it matters anymore, I guess you noticed we're moved to GitLab now ;-D )

Either way I'd really like to see this feature finished!

We currently also have a request to backport the control points to the stable branch, see
https://gitlab.com/inkscape/inkscape/merge_requests/47

Do you think you could provide the same fix for rectangles in time (it would probably need to happen before Jul 22nd, which is the currently planned date for 0.92.x string freeze)?

Antonio Ospite (ospite) wrote :

Hi,

I am much more comfortable with git, it's a great news.

I am back working on these changes and I should be able to provide patches (either for you to apply with git-am or via a pull-request) in the next few days.

I'll start with the control points to spirals and rectangles (I already have the code), and I will also try to improve the tooltips of all the center control points I added previously, suggestions from native English speakers are appreciated.

For example, how can the description for center of ellipses be improved?

    ...
    entity_center->create(desktop, item, this, Inkscape::CTRL_TYPE_POINT,
                          _("Move the ellipse"),
                          SP_KNOT_SHAPE_CROSS);

After that I plan to give it a go to adding a "translation" center control point to the general selection tool as well, It will be the center of the bounding box.

Not sure if the latter is 0.92.x material tho, the code changes are a little more intrusive.

See you soon,
   Antonio

Patrick Storz (ede123) wrote :

That's great news! Looking forward to it.

Regarding strings (I'm not a native speaker either) I'm not sure there's much to improve. One could probably drop the "the" (e.g. simply "Move ellipse"), on the other hand in the place were something similar existed before (3D boxes) the label is also "Move the box in perspective", so *if* we change something it should be kept in sync.
If we want something more talkative (and stylized) along the strings for other control points I could imagine "Move <b>center point</b> of the ellipse" or "Position <b>center point</b> of the ellipse"

I agree, center control points for bounding boxes are probably something for master-only (if they work out well we can still think about back-porting to 0.92.3 - if that version happens)

Antonio Ospite (ospite) wrote :

I like "Move the <b>center point</b> of the ellipse", I am not sure about the "the" tho, because in the other strings sometimes it's there (e.g. "Position the <b>start point</b> of the arc ...") and sometimes it's not (e.g. "Adjust ellipse <b>width</b>, ...").

I guess we could leave the text of the 3D Boxes unchanged because it's not really about the *center* point.

Antonio Ospite (ospite) wrote :

BTW I noticed that the coloring of these center points behaves differently from the center or rotation of the general selection tool, this can be seen for example when the shape have a very dark fill color.

This seems to happen because these new control points are created with KnotHolderEntity::create() which only sets the fill color, but the SP_KNOT_SHAPE_CROSS handle is drawn using strokes.

The issue were already present with the cross handle of 3Dbox but I just noticed it now playing with the other shapes.

I'll open a new bug report about that but I just wanted to give a heads up here.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers