Profile Picture

Resizing/Scale while obeying ResizeInAggregate property?

Posted By Jason Irby 6 Years Ago

Resizing/Scale while obeying ResizeInAggregate property?

Author
Message
Jason Irby
Posted 6 Years Ago
View Quick Profile
Forum Member

Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)Forum Member (41 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 59, Visits: 77

Question:  What command do I use to resize/scale a group programatically like the diagram view does when you drag the handle bars (i.e. obey ResizeInAggregate property of child shapes)?

Explanation:  I have a complex object of a main shape and several child shapes around it's perimeter.  Like:
https://www.nevron.com/forum/uploads/images/7bf0156a-4f44-425b-934c-65b6.png


The child shapes have all their ResizeInAggregate property set to RepositionOnly.  So I only want to resize the main shape and re-position the child shapes.  This works fine in the diagram view when I resize by dragging the handles:

https://www.nevron.com/forum/uploads/images/fcbd801d-184a-4bec-b978-a61e.png

But at times I need to programatically do it.  When I tried to scale the group with
public virtual void Scale(CoordinateSystem system, float scaleX, float scaleY, NPointF pin);
it scaled the child shapes and not just re-positioned them.  Like it ignored the ResizeInAggregate property:
https://www.nevron.com/forum/uploads/images/4a7fca45-c4c9-4e6c-82c4-a9fa.png
 I must be missing something.

Thanks in advance.




Nevron Support
Posted 6 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: 26 minutes ago
Posts: 3,054, Visits: 4,009
Hi,

Instead of Scale, use the ScaleModel method of the group. For example, to make the groups 2 times larger in both width and height, use the following code:

group.ScaleModel(2, 2, group.ModelBounds.Center);



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic