コード例 #1
0
        public SetupForm(ElementEllipse aEllipse, IRedraw aRedraw)
        {
            mEllipse = aEllipse;
            mRedraw  = aRedraw;
            InitializeComponent();

            spinEdit_X.Value            = mEllipse.mX;
            spinEdit_Y.Value            = mEllipse.mY;
            spinEdit_Width.Value        = mEllipse.mWidth;
            spinEdit_Height.Value       = mEllipse.mHeight;
            spinEdit_BorderWidth.Value  = mEllipse.BorderWidth;
            colorEdit_BorderColor.Color = mEllipse.BorderColor;
            colorEdit_FillColor.Color   = mEllipse.FillColor;
        }
コード例 #2
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);
        }