Relative postion
Moderators: SDS, support, admin
Relative postion
Hi,
We haved added picture boxes to the cad picture box control after loading the floor plan to show our entities.The Problem is we need to change the relative position of picture boxes
when we zoom in and Zoom out.
We haved added picture boxes to the cad picture box control after loading the floor plan to show our entities.The Problem is we need to change the relative position of picture boxes
when we zoom in and Zoom out.
Re: Relative postion
Hello.
Unfortunately I'm not sure I understood correctly your task. If you need move one or more PictureBox/CADPictureBox objects on form then please set CADPictureBox.Location or PictureBox.Location. This property can be set after zoom operation.
Alexander.
Unfortunately I'm not sure I understood correctly your task. If you need move one or more PictureBox/CADPictureBox objects on form then please set CADPictureBox.Location or PictureBox.Location. This property can be set after zoom operation.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: Relative postion
Hi,
I need to set the new top and left for the picture box. The problem is i am not getting the coordinates. e.g I placed the picture box (.NET control) on mouse click on 120,430 . When I Zoom in or Zoom out how I can get the corresponding position in the new scale.
I need to set the new top and left for the picture box. The problem is i am not getting the coordinates. e.g I placed the picture box (.NET control) on mouse click on 120,430 . When I Zoom in or Zoom out how I can get the corresponding position in the new scale.
Re: Relative postion
Hello.
Zoom functionality changes CADImage and screen points correspondence. If you need PictureBox (added to CADPictureBox) control fixed on screen then you don't need any additional code. Reversed situation if you want move PictureBox on screen to provide PictureBox top/left point correspondence to some fixed point on drawing. In that case you need transform two-dimensional screen coordinates to three-dimensional CAD coordinates then reconversion after zoom.
You can transform a two-dimensional screen point into three-dimensional CAD point using CADConst.GetRealPoint method. Reverse conversion can be fulfiled using CADImage.GetPoint method. Please see example in Viewer demo application.
Alexander.
Zoom functionality changes CADImage and screen points correspondence. If you need PictureBox (added to CADPictureBox) control fixed on screen then you don't need any additional code. Reversed situation if you want move PictureBox on screen to provide PictureBox top/left point correspondence to some fixed point on drawing. In that case you need transform two-dimensional screen coordinates to three-dimensional CAD coordinates then reconversion after zoom.
You can transform a two-dimensional screen point into three-dimensional CAD point using CADConst.GetRealPoint method. Reverse conversion can be fulfiled using CADImage.GetPoint method. Please see example in Viewer demo application.
Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support