hi Stoyo,
i tested it with SVGNodes which have only solid colors and no gradients. the result is the same...
Do you have an other hint what could decrease the performance?
...could it depent on the draw methode?
' ...
Public Sub New(ByVal diagram As Diagram)
' ...
MyBase.New(diagram)
' ...
' SVG-Content ....
Dim newContent As New SvgContent()
newContent.Parse(Application.StartupPath & "\images\Node.svg")
Content = newContent
Transparent = True
' ...
' Knotenspezifisch
Bounds = New System.Drawing.Rectangle(0, 0, 20, 20)
EnabledHandles = AdjustmentHandles.Move
HandlesStyle = MindFusion.Diagramming.HandlesStyle.EasyMove
Label_Druck = "p = 0,0bar"
Label_Temperatur = "T = 0,0°C"
Tag = "Node"
ToolTip = Nothing
' ...
' DataTable Properties generieren
genDataTableProperties()
' ...
' DataTable FluidTemperatures generieren
genDataTableFluidTemperatures()
' ...
' DataTable Knoten Warnungen generieren
genDatatableNodeWarnings()
' ...
End Sub
' ...
Public Overrides Sub Draw(ByVal graphics As MindFusion.Drawing.IGraphics, ByVal options As MindFusion.Diagramming.RenderOptions)
MyBase.Draw(graphics, options)
' ...
' ... Label
Dim Font_Name As New System.Drawing.Font(New System.Drawing.FontFamily("Verdana"), 7, FontStyle.Bold, GraphicsUnit.Point)
Dim Font_Value As New System.Drawing.Font(New System.Drawing.FontFamily("Verdana"), 7, FontStyle.Regular, GraphicsUnit.Point)
' ...
' ... Label Benennung
If FlowSim_AppWindow.ShowNodeName.EditValue = True And Me.Visible = True Then
' ...
Dim LabelFormat As New StringFormat(StringAlignment.Center)
Dim LabelSize As New SizeF(FlowSim_Designer.Diagram1.MeasureString(_Label_NodeName, Font_Name, Integer.MaxValue, LabelFormat))
Dim LabelCenter As New RectangleF(GetCenter.X + 1, Bounds.Bottom - 1, LabelSize.Width, LabelSize.Height)
' ...
graphics.FillRectangle(Brushes.White, LabelCenter)
graphics.DrawString(_Label_NodeName, Font_Name, Brushes.Black, LabelCenter, LabelFormat)
' ...
End If
' ...
' Label Druck
If FlowSim_AppWindow.RadioGroup_Node.EditValue = 2 And Me.Visible = True Then
' ...
Dim LabelFormat As New StringFormat(StringAlignment.Center)
Dim LabelSize As New SizeF(FlowSim_Designer.Diagram1.MeasureString(_Label_NodeDruck, Font_Value, Integer.MaxValue, LabelFormat))
Dim LabelCenter As New RectangleF(GetCenter.X, Bounds.Bottom + 9, LabelSize.Width, LabelSize.Height)
' ...
graphics.FillRectangle(Brushes.White, LabelCenter)
graphics.DrawString(_Label_NodeDruck, Font_Value, Brushes.DarkSlateGray, LabelCenter, LabelFormat)
' ...
End If
' ...
' Label Temperatur
If FlowSim_AppWindow.RadioGroup_Node.EditValue = 3 And Me.Visible = True Then
' ...
Dim LabelFormat As New StringFormat(StringAlignment.Center)
Dim LabelSize As New SizeF(FlowSim_Designer.Diagram1.MeasureString(_Label_NodeTemperatur, Font_Value, Integer.MaxValue, LabelFormat))
Dim LabelCenter As New RectangleF(GetCenter.X, Bounds.Bottom + 9, LabelSize.Width, LabelSize.Height)
' ...
graphics.FillRectangle(Brushes.White, LabelCenter)
graphics.DrawString(_Label_NodeTemperatur, Font_Value, Brushes.DarkSlateGray, LabelCenter, LabelFormat)
' ...
End If
' ...
End Sub
Marco