MultipleSelect on rotate image
Moderators: SDS, support, admin
- Paolo Turrini
- Posts: 4
- Joined: 25 Feb 2011, 12:06
MultipleSelect on rotate image
I have a dxf image that it is was rotate with:
when i use:
No entities are selected.
Do you know how solve this problem?
Code: Select all
this.cadImage.Rotate(Axes.Z, 90);
Code: Select all
private bool MultipleSelect()
{
if (cadImage.SelectionMode == SelectionEntityMode.Enabled)
{
int l = this.clipRectangle.ClientRectangle.Left;
int t = this.clipRectangle.ClientRectangle.Top;
DPoint pt1 = this.GetRealPoint(l, t);
DPoint pt2 = this.GetRealPoint(this.clipRectangle.ClientRectangle.Right, this.clipRectangle.ClientRectangle.Bottom);
DRect tmpRect = new DRect(pt1.X, pt1.Y, pt2.X, pt2.Y);
Region rg = cadImage.GetSelectEntityRegion(new Rectangle((int)l, (int)t, this.clipRectangle.ClientRectangle.Width, this.clipRectangle.ClientRectangle.Height));
try
{
cadImage.MultipleSelect(tmpRect, true, true);
}
catch { }
cadPictBox.Invalidate(rg);
rg.Dispose();
return true;
}
return false;
}
Do you know how solve this problem?
Paolo Turrini
Consulenze Informatiche
Via Pavone 71
44121 Ferrara - Italy
Tel. +39 051 051 64 90
Fax. +39 0532 19 11 789
Cel.+39 339 8715400
E-mail: info@informaticaturrini.com
Sito: http://www.informaticaturrini.com
Consulenze Informatiche
Via Pavone 71
44121 Ferrara - Italy
Tel. +39 051 051 64 90
Fax. +39 0532 19 11 789
Cel.+39 339 8715400
E-mail: info@informaticaturrini.com
Sito: http://www.informaticaturrini.com
Re: MultipleSelect on rotate image
Hello Paolo.
The problem depends on the following code:MultipleSelect method requires DRect object that meet the conditions: top > bottom and right > left. The rectangle from the rotated image can mismatch the conditions. You can substitute the following code instead the above mentioned:
Alexander.
The problem depends on the following code:
Code: Select all
DRect tmpRect = new DRect(pt1.X, pt1.Y, pt2.X, pt2.Y);
Code: Select all
DRect tmpRect = DRect.BadRect;
tmpRect.Expand(pt1);
tmpRect.Expand(pt2);
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support