public SetupForm(ElementText aText, IRedraw aRedraw) { mText = aText; mRedraw = aRedraw; InitializeComponent(); spinEdit_X.Value = mText.mX; spinEdit_Y.Value = mText.mY; textBox_Text.Text = mText.mText; buttonEdit_Font.Text = StringUtils.ObjectToString(mText.TextFont); colorEdit_Color.Color = mText.TextColor; comboBox_Rotate.SelectedIndex = (int)mText.mRotation; }
public VectorImagePanel() { InitializeComponent(); var lRec = new ElementRectangle.ElementRectangle(); lRec.mX = 0; lRec.mY = 0; lRec.mWidth = Width - 1; lRec.mHeight = Height - 1; mElements.Add(lRec); var lText = new ElementText.ElementText(); lText.TextFont = new Font("Microsoft Sans Serif", 12); lText.mX = 103; lText.mY = 79; lText.mText = "Image"; mElements.Add(lText); }
public void fillForDemo() { clear(); var lText = new ElementText.ElementText(); lText.mX = 37; lText.mY = 9; lText.mText = "Hello, world!"; lText.TextFont = new Font("Microsoft Sans Serif", 20); lText.TextColor = Color.Blue; mElements.Add(lText); var lEllipse = new ElementEllipse.ElementEllipse(); lEllipse.mX = 73; lEllipse.mY = 64; lEllipse.mWidth = 73; lEllipse.mHeight = 64; lEllipse.FillColor = Color.Red; mElements.Add(lEllipse); var lRec = new ElementRectangle.ElementRectangle(); lRec.mX = 127; lRec.mY = 89; lRec.mWidth = 60; lRec.mHeight = 60; lRec.FillColor = Color.LimeGreen; mElements.Add(lRec); lRec = new ElementRectangle.ElementRectangle(); lRec.mX = 0; lRec.mY = 0; lRec.mWidth = Width - 1; lRec.mHeight = Height - 1; mElements.Add(lRec); }