public void Draw(Graphics g) // root ruler { boxId = RulerBoxId.Origin; rulerBrushHighlight = rulerBrushLight1; PointF[] selPts; using (Matrix m = stage.GetDynamicMatrix()) { if (!stage.IsEditingRoot) { m.Multiply(stage.GetCurrentMatrix(), MatrixOrder.Append); } selPts = stage.Selection.GetTransformedPoints(m); } Rectangle selRect = selPts.GetBounds(); Point rulerCenter = new Point(RulerSize, RulerSize); useProportionalRulers = true; using (Matrix rootM = stage.GetCalculatedRootMatrix()) { DrawRulers(g, rulerCenter, new Rectangle(Point.Empty, stage.CanvasSize), stage.vexObject.ViewPort.SysRectangle(), selRect, rootM); } }