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
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;
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.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;
Thanks in advance
(Refers to incident 9618)
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?
DJDaniel Jebaraj Syncfusion Team March 23, 2004 08:15 AM
Apologies for the delay in getting back. Someone from the Diagram team will get back on this today.
Thank you for using Essential Diagram.
ADAdministrator Syncfusion Team March 23, 2004 02:55 PM
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.
ADAdministrator Syncfusion Team March 24, 2004 03:46 PM
This problem has been fixed! Forthcoming updates of Essential Diagram will ship with the revised code.