public PropertiesGraphicsText(GraphicsText graphicsText) { if (graphicsText == null) { throw new ArgumentNullException("graphicsText"); } this.text = graphicsText.Text; this.left = graphicsText.Left; this.top = graphicsText.Top; this.right = graphicsText.Right; this.bottom = graphicsText.Bottom; this.objectColor = graphicsText.ObjectColor; this.textFontSize = graphicsText.TextFontSize; this.textFontFamilyName = graphicsText.TextFontFamilyName; this.textFontStyle = FontConversions.FontStyleToString(graphicsText.TextFontStyle); this.textFontWeight = FontConversions.FontWeightToString(graphicsText.TextFontWeight); this.textFontStretch = FontConversions.FontStretchToString(graphicsText.TextFontStretch); this.actualScale = graphicsText.ActualScale; this.ID = graphicsText.Id; this.selected = graphicsText.IsSelected; }
public override GraphicsBase CreateGraphics() { GraphicsBase b = new GraphicsText( text, left, top, right, bottom, objectColor, textFontSize, textFontFamilyName, FontConversions.FontStyleFromString(textFontStyle), FontConversions.FontWeightFromString(textFontWeight), FontConversions.FontStretchFromString(textFontStretch), actualScale); if (this.ID != 0) { b.Id = this.ID; b.IsSelected = this.selected; } return(b); }