public DisplayItemText(String str, GePoint Position, Font font) { m_String = str; m_Position = Position; m_Font = font; m_Range = new GeRectangle(); }
public GeRectangle(GeRectangle src) { if(src != null) { m_MinPoint = new GePoint(src.MinPoint); m_MaxPoint = new GePoint(src.m_MaxPoint); } }
public override void DrawArc(GeRectangle rect , float startAngle, float endAngle) { RectangleF rc = new RectangleF((float)rect.MinPoint.X, (float)rect.MinPoint.Y, (float)rect.Width, (float)rect.Height); Pen pen = GetPen(); m_Graphics.DrawArc(pen, rc, startAngle, endAngle); }
public static void GenDisplayItemLines(DisplayItemList DLList, GeRectangle rec) { Debug.Assert(DLList != null && rec != null); if (null == DLList || null == rec) return; GePoint MinPoint = rec.MinPoint; GePoint MaxPoint = rec.MaxPoint; GePoint Corner1 = new GePoint(MinPoint.X, MaxPoint.Y); GePoint Corner2 = new GePoint(MaxPoint.X, MinPoint.Y); // Add the bounding of the rectangular. GenDisplayItemLine(DLList, Corner1, MinPoint); GenDisplayItemLine(DLList, MinPoint, Corner2); GenDisplayItemLine(DLList, Corner2, MaxPoint); GenDisplayItemLine(DLList, MaxPoint, Corner1); DLList.AddItem(new DisplayItemPoint(MinPoint)); DLList.AddItem(new DisplayItemPoint(MaxPoint)); DLList.AddItem(new DisplayItemPoint(Corner1)); DLList.AddItem(new DisplayItemPoint(Corner2)); }
public override GeRectangle GetRange(String str, Font font) { // Measure string. SizeF stringSize = m_Graphics.MeasureString( str, font); GeRectangle rec = new GeRectangle(new GePoint(0, 0) , new GePoint(stringSize.Width, stringSize.Height)); return rec; }
public override void FillEllipse( GeRectangle rect) { RectangleF rc = new RectangleF((float)rect.MinPoint.X, (float)rect.MinPoint.Y, (float)rect.Width, (float)rect.Height); FillEllipse(rc); }
public GeRectangle GetRichStringRange(RichString str) { Graphics gp = GetGDIGraphics(); // Measure string. SizeF stringSize = new SizeF(); FontManager manager = PtApp.ActiveDocument.GetFontManager(); Font StrFont = null; if (str.FontID != -1) StrFont = manager.GetFont(str.FontID); else StrFont = manager.GetApplicationDefaultFont(); // Device coordinates stringSize = gp.MeasureString( str.GetString(), StrFont); // Defect - We should convert to World coordinates here. GeRectangle rec = new GeRectangle(new GePoint(0, 0) , new GePoint(stringSize.Width, stringSize.Height)); return rec; }
public override void FillEllipse( GeRectangle rect) { Debug.Assert(false, "NO IMP"); }
public override void DrawArc(GeRectangle rect , float startAngle, float endAngle) { Debug.Assert(false, "NO IMP"); }
// This routine should be update by using OpenGL public override GeRectangle GetRange(String str, Font font) { Debug.Assert(false, "NO IMP"); // Measure string. SizeF stringSize = new SizeF(); GeRectangle rec = new GeRectangle(new GePoint(0, 0) , new GePoint(stringSize.Width, stringSize.Height)); return rec; }
public static DisplayItemText GenDisplayItemText(DisplayItemList list, RichString str, GePoint position, GeRectangle rec) { //GeRectangle rec = PtApp.ActiveView.GetRichStringRange(str); DisplayItemText DLText = new DisplayItemText(str.GetString(), position, str.GetFont()); DLText.Range = rec; if (list != null) list.AddItem(DLText); return DLText; }
public abstract void FillEllipse( GeRectangle rect);
public abstract void DrawArc(GeRectangle rect , float startAngle, float endAngle);