The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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)
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
DJDaniel Jebaraj Syncfusion Team 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
ADAdministrator Syncfusion Team 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
ADAdministrator Syncfusion Team 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