public void Draw(CanvasContext2D canv) { canv.Save(); var size = 0; canv.StrokeStyle = canv.FillStyle = "white"; canv.LineWidth = 3; canv.Me().dashedRect(Element.TotalX - size, Element.TotalY - size, Element.Width + size * 2, Element.Height + size * 2, new int[] {2, 2}); //canv.strokeRect(this.element.totalX() - size, this.element.totalY() - size, this.element.width + size * 2, this.element.height + size * 2); var x = Element.TotalX; var y = Element.TotalY; var w = Element.Width; var h = Element.Height; foreach (var j in points) { canv.FillRect(x + ( w * j.X / 100 ) - j.Size / 2, y + ( h * j.Y / 100 ) - j.Size / 2, j.Size, j.Size); } canv.Restore(); }