Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Need Custom Shaped Selection Handle (Read 3537 times)
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Need Custom Shaped Selection Handle
Mar 24th, 2010 at 6:54am
Print Post  
Hi Stoyan,

In our application, we have some custom shaped ShapeNode(like pentagon, hexagon and  etc.)

We are using DrawAdjustmentHandle() of diagram to draw selection rectangle for these shapes, but we are not able to find any method which accepts Shape as an argument.

Please suggest how we can draw Custom Selection Handle for our Custom Shaped Nodes.

Thanks
Bala
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Need Custom Shaped Selection Handle
Reply #1 - Mar 24th, 2010 at 11:38am
Print Post  
Hi Bala,

Do you need to draw a selection border with the same shape as the node? You could use the Shape.Draw method for that. It draws the shape with its definition coordinates in the 0-100 range, so you will need to first apply a scale transform such as dc.ScaleTransform(nodeWidth / 100, nodeHeight / 100) .

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Re: Need Custom Shaped Selection Handle
Reply #2 - Apr 1st, 2010 at 5:20am
Print Post  
Hi Stoyan,

I have tried but not got desired output. I am sending the sample application please suggest the right way.

Thanks,
Anshul
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Need Custom Shaped Selection Handle
Reply #3 - Apr 1st, 2010 at 11:54am
Print Post  
Hi Anshul,

It seems you are using an older version that does not have a public Shape.Draw method. Try the following instead:

Code
Select All
if (e.Item is DiagramNode)
{
	DiagramNode node = e.Item as DiagramNode;
	e.Graphics.DrawGeometry(null, new Pen(Brushes.Red, 3), node.GetRegion());
	... 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Bala
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 156
Joined: Apr 21st, 2009
Re: Need Custom Shaped Selection Handle
Reply #4 - Apr 1st, 2010 at 2:57pm
Print Post  
Thanks Stoyan Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint