Beispiel #1
0
        public SetupForm(ElementRectangle aRectangle, IRedraw aRedraw)
        {
            mRectangle = aRectangle;
            mRedraw    = aRedraw;
            InitializeComponent();

            spinEdit_X.Value            = mRectangle.mX;
            spinEdit_Y.Value            = mRectangle.mY;
            spinEdit_Width.Value        = mRectangle.mWidth;
            spinEdit_Height.Value       = mRectangle.mHeight;
            spinEdit_BorderWidth.Value  = mRectangle.BorderWidth;
            colorEdit_BorderColor.Color = mRectangle.BorderColor;
            colorEdit_FillColor.Color   = mRectangle.FillColor;
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }