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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Resize / Onscale / Texture problems with Symbols

Thread ID:





11636 Mar 12,2004 07:54 AM UTC Mar 24,2004 08:46 PM UTC WinForms 5
Tags: Diagram
Michael Mann
Asked On March 12, 2004 07:54 AM UTC

Hi, I have some problems when working with my own implemented symbols. I want the symbol to represent itself - so I want to use a texture. When I use clamp texture mode - the image is always painted at the diagram''s origin at 0, 0 and not at the origin of it''s container node or rectangle. That''s even the problem in the Symbol Designer delivered by the product. Therefore I use the tile mode, but I hope I can use the clamp mode in future as well. I want the image displayed in the middle of the background rectangle of the symbol. After initialization it works. But after a scaling has occurred, I have the following problem. Because of the fact that the OnScale doesn''t work - or the event isn''t triggered - don''t know why - I use the event OnBoundsChanged to react to a scaling change. I compute the middle of the background rectangle and place the new rectangle (with the image as texture) in the very middle of the background rectangle. But it doesn''t work - I think that''s due to scaling factors. But if I set the property AllowResize to false - it doesn''t work at all. Even in the Symbol designer the same problems occur. Here''s my sample code: protected override void OnBoundsChanged(BoundsEventArgs evtArgs) { Syncfusion.Windows.Forms.Diagram.Rectangle panel = children["IconPanel"] as Syncfusion.Windows.Forms.Diagram.Rectangle; Syncfusion.Windows.Forms.Diagram.Rectangle back = children["SymbolBack"] as Syncfusion.Windows.Forms.Diagram.Rectangle; children.Remove(panel); float x = (back.Width / 2) - (49 / 2); float y = (back.Height / 2) - (49 / 2); // place the new rectangle at the very middle and set it''s size to 49x49 Syncfusion.Windows.Forms.Diagram.Rectangle newPanel = new Syncfusion.Windows.Forms.Diagram.Rectangle(x, y, 49, 49); newPanel.SetPropertyValue("AllowResize", false); newPanel.Scale(1, 1); newPanel.Name = "IconPanel"; newPanel.FillStyle.Color = Color.Yellow; // not in use - test it with fill color // newPanel.FillStyle.TextureWrapMode = System.Drawing.Drawing2D.WrapMode.Tile; // newPanel.FillStyle.Texture = Texture; this.AppendChild(newPanel); } Thanks in advance Michael Mann (Refers to incident 9618)

Michael Mann
Replied On March 16, 2004 09:33 AM UTC

Anyone out there?

Michael Mann
Replied On March 23, 2004 01:06 PM UTC

Hey guys, I''m really sad about the many answers I got to my postings. Just to mention it once again: I really have a problem with the symbols. Any statements? Michael Mann

Daniel Jebaraj [Syncfusion]
Replied On March 23, 2004 01:15 PM UTC

Michael, Apologies for the delay in getting back. Someone from the Diagram team will get back on this today. Thank you for using Essential Diagram. Best regards, Daniel Syncfusion

Administrator [Syncfusion]
Replied On March 23, 2004 07:55 PM UTC

Hi Michael, I was able to view the problem in a symbol generated using the Symbol Designer and have logged a high priority QA report. We will look into the issue and try to fix this before the final release of Essential Suite 2.0. Thank you for bringing this to our attention. Prakash Syncfusion

Administrator [Syncfusion]
Replied On March 24, 2004 08:46 PM UTC

Michael, This problem has been fixed! Forthcoming updates of Essential Diagram will ship with the revised code. Regards, Prakash Syncfusion, Inc


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon