We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

I have accomplished to create an image

Thread ID:

Created:

Updated:

Platform:

Replies:

18221 Aug 26,2004 04:20 AM Aug 27,2004 01:05 PM Windows Forms 5
loading
Tags: Diagram
Administrator [Syncfusion]
Asked On August 26, 2004 04:20 AM

I have a class (MySymbol) derived from Symbol. and in Mysymbol I had put a field BitmapNode and append child it to my instance. The problem is that the image appears far from the center of the symbol and when I move it it seems to mode exponentially far.... to right direction, and closer in left direction. How can I center the image in my symbol and use it just as a symbol ? Thanks.

Administrator [Syncfusion]
Replied On August 26, 2004 02:56 PM

Hi Rui, Here is a sample that demonstrates what you are looking for. MySymbol is a custom Symbol which consists of an outer rectangle and a inner BitmapNode that is at the center of the outer rectangle. Take a look at the code in MySymbol''s constructor where the innerimage''s X and Y (i.e. the center of the BitmapNode) are set to center it inside the outer rectangle as per your requirement. Regards Arun

Administrator [Syncfusion]
Replied On August 27, 2004 05:10 AM

Ok... I''m now able to insert a symbol/image. The problem I can''t resolve now is: -with a rectangle symbol, the link between two symbols was starting and ending in the rectangles limit. Now, the links start and end in the image center... I don''t want that. I want to links to start and end at the limit of the symbol. Can anyone help ? Thanks >Hi Rui, > >Here is a sample that demonstrates what you are looking for. MySymbol is a custom Symbol which consists of an outer rectangle and a inner BitmapNode that is at the center of the outer rectangle. > >Take a look at the code in MySymbol''s constructor where the innerimage''s X and Y (i.e. the center of the BitmapNode) are set to center it inside the outer rectangle as per your requirement. > >Regards >Arun

Administrator [Syncfusion]
Replied On August 27, 2004 07:09 AM

Hi Rui, Calling: this.CenterPort.AttachAtPerimeter = true; will ensure that the link will terminate at the boundary of your symbol. Regards Arun

Administrator [Syncfusion]
Replied On August 27, 2004 07:48 AM

I''m sorry but I tried to insert it in the symbols constructors code but it did not work. Where should I insert the code ? >Hi Rui, > >Calling: >this.CenterPort.AttachAtPerimeter = true; > >will ensure that the link will terminate at the boundary of your symbol. > >Regards >Arun >

Administrator [Syncfusion]
Replied On August 27, 2004 01:05 PM

Hi Rui, Here is a sample demonstarting what was desscribed in the previous posting. Run the sample and try creating links between MySymbol and MyTriangle. Take a look at the underlying code in MySymbol.cs for MyTriangle. You will see that: this.CenterPort.AttachAtPerimeter = true; if you set it to true and then try creating links to MyTriangle, it will terminate at the center instead of the edge. Regards Arun

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;