internal override void Draw() { ISpatialDisplay display = EditingController.Current.ActiveDisplay; // Redraw the arcs that are suitable for the next pointing operation. DrawCurves(); // Draw a solid line to represent displayed distance (if any) if (m_CurrentDistanceArc!=null) { DrawStyle style = new DrawStyle(Color.Magenta); style.Pen.Width = 3.0F; style.Render(display, m_CurrentDistanceArc); } // Draw the points. if (m_Point1!=null) m_Point1.Draw(display, InverseColors[0]); if (m_Point2!=null) m_Point2.Draw(display, InverseColors[1]); }
/// <summary> /// Draws the text that is currently being added, together with a rectangle representing /// the outline of the label. /// </summary> /// <param name="refpos">Reference position for the label</param> protected void DrawText(IPosition refpos) { if (refpos==null) return; // Draw the outline of the label. IPosition[] outline = GetOutline(refpos); IDrawStyle style = new DrawStyle(); // black style.Render(ActiveDisplay, outline); // Draw the text PointGeometry p = PointGeometry.Create(refpos); IFont font = (m_Entity==null ? null : m_Entity.Font); MiscTextGeometry text = new MiscTextGeometry(m_Text, p, font, m_Height, m_Width, (float)m_Rotation); style.Render(ActiveDisplay, text); // If doing auto-angle stuff, draw an additional line // at the position used to search for candidate lines // ... perhaps (the auto-angle stuff needs to move to // this class from CuiNewLabel) // Remember the specified position as the "last" position. m_LastPos = refpos; }