Discussion:
[Wxart2d-users_dev] getting the radius from an edited a2dCircle
Mike Gibson
2016-11-21 20:19:56 UTC
Permalink
Hello,

I have a dialog that creates an a2dCanvas and has an a2dStToolContr, and
the a2dStToolContr has a a2dRecursiveEditTool pushed onto it. When the
dialog is created, an a2dCircle is drawn onto the canvas.

The point of this dialog is for the user to simply edit the size and
position of that circle, and then save off the new xy position and radius.

After the circle is edited, calling m_Circle->GetRadius() is ALWAYS
returning the original radius, and not the edited radius. How do I get
the new radius?

Also, is there a way to restrict the circle so that resizing MUST be xy
synced (ie, the circle can be resized to a circle, but cannot be resized
to an ellipse. X and Y must maintain a 1:1 ratio)?


Thanks!
- Mike


------------------------------------------------------------------------------
klaas.holwerda
2016-11-22 19:37:56 UTC
Permalink
Hi,
Post by Mike Gibson
Hello,
I have a dialog that creates an a2dCanvas and has an a2dStToolContr, and
the a2dStToolContr has a a2dRecursiveEditTool pushed onto it. When the
dialog is created, an a2dCircle is drawn onto the canvas.
Beter use a2dObjectEditTool I think.
Post by Mike Gibson
The point of this dialog is for the user to simply edit the size and
position of that circle, and then save off the new xy position and radius.
After the circle is edited, calling m_Circle->GetRadius() is ALWAYS
returning the original radius, and not the edited radius. How do I get
the new radius?
Well what do you see when editing is finished? Did the radius change on screen?
I think only matrix was changed not the radius, but with the change below, radius is changed now.
Post by Mike Gibson
Also, is there a way to restrict the circle so that resizing MUST be xy
synced (ie, the circle can be resized to a circle, but cannot be resized
to an ellipse. X and Y must maintain a 1:1 ratio)?
You lucky, implemented that a few days ago, just update.

Regards,

Klaas



------------------------------------------------------------------------------
Loading...