Node DrawCustomShape(float x, float y) { var node = new Node(x, y, 40, 40); SfGraphics grap = new SfGraphics(); Pen stroke = new Pen(); stroke.Brush = new SolidBrush(UIColor.Clear); stroke.StrokeWidth = 3; stroke.StrokeBrush = new SolidBrush(UIColor.FromRGB(24, 161, 237)); grap.DrawEllipse(stroke, new System.Drawing.Rectangle(10, 0, 20, 20)); grap.DrawArc(stroke, 0, 20, 40, 40, 180, 180); node.UpdateSfGraphics(grap); return(node); }
Node DrawCustomShape(float x, float y) { var node = new Node(m_context); node.OffsetX = x * MainActivity.factor; node.OffsetY = y * MainActivity.factor; node.Width = 50 * 2 * MainActivity.factor; node.Height = 40 * 2 * MainActivity.factor; SfGraphics grap = new SfGraphics(); Pen stroke = new Pen(); stroke.Brush = new SolidBrush(Color.Transparent); stroke.StrokeWidth = 3 * MainActivity.factor; stroke.StrokeBrush = new SolidBrush(Color.Rgb(24, 161, 237)); grap.DrawEllipse(stroke, new System.Drawing.Rectangle(10, 0, 20, 20)); grap.DrawArc(stroke, 0, 20, 40, 40, 180, 180); node.UpdateSfGraphics(grap); return(node); }
Node DrawCustomShape(float x, float y) { var node = new Node(); if (Device.RuntimePlatform == Device.Android) { node.Width = 50 * DiagramUtility.factor; node.Height = 40 * DiagramUtility.factor; } else { node.Width = node.Height = 40 * DiagramUtility.factor; } node.OffsetX = x * DiagramUtility.factor; node.OffsetY = y * DiagramUtility.factor; if (Device.RuntimePlatform == Device.UWP) { node.Style.Brush = new SolidBrush(Color.Transparent); node.Style.StrokeBrush = new SolidBrush(Color.FromRgb(24, 161, 237)); node.Style.StrokeWidth = 3 * DiagramUtility.factor; } SfGraphicsPath sfpath4 = new SfGraphicsPath(); SfGraphics grap = new SfGraphics(); Pen stroke = new Pen(); stroke.Brush = new SolidBrush(Color.Transparent); stroke.StrokeWidth = 3; stroke.StrokeBrush = new SolidBrush(Color.FromRgb(24, 161, 237)); grap.DrawEllipse(stroke, new Rectangle(10, 0, 20, 20)); if (Device.RuntimePlatform == Device.UWP) { grap.DrawArc(stroke, 0, 20, 40, 40, 0, 180); } else { grap.DrawArc(stroke, 0, 20, 40, 40, 180, 180); } node.UpdateSfGraphics(grap); return(node); }