コード例 #1
0
ファイル: CustomRect.cs プロジェクト: kenobit/VectorPaint
        public CustomRect(int x, int y, int width, Color color)
        {
            InitializeComponent();
            this.Data = new XData();
            this.Data.PointX = x;
            this.Data.PointY = y;
            this.Data.SizeX = width;
            this.Data.SizeY = width;
            this.Data.Width = width;
            this.Data.Color = color;

            System.Drawing.Drawing2D.GraphicsPath Button_Path = new System.Drawing.Drawing2D.GraphicsPath();
            Button_Path.AddRectangle(new System.Drawing.Rectangle(this.Data.PointX, this.Data.PointY, this.Data.SizeX, this.Data.SizeY));
            Region Button_Region = new Region(Button_Path);
            this.Region = Button_Region;
            Graphics g = this.CreateGraphics();
            OnPaint(new PaintEventArgs(g, new System.Drawing.Rectangle(this.Location.X, this.Location.Y, this.Width, this.Height)));
        }
コード例 #2
0
        public CustomRect(int x, int y, int width, Color color)
        {
            InitializeComponent();
            this.Data        = new XData();
            this.Data.PointX = x;
            this.Data.PointY = y;
            this.Data.SizeX  = width;
            this.Data.SizeY  = width;
            this.Data.Width  = width;
            this.Data.Color  = color;

            System.Drawing.Drawing2D.GraphicsPath Button_Path = new System.Drawing.Drawing2D.GraphicsPath();
            Button_Path.AddRectangle(new System.Drawing.Rectangle(this.Data.PointX, this.Data.PointY, this.Data.SizeX, this.Data.SizeY));
            Region Button_Region = new Region(Button_Path);

            this.Region = Button_Region;
            Graphics g = this.CreateGraphics();

            OnPaint(new PaintEventArgs(g, new System.Drawing.Rectangle(this.Location.X, this.Location.Y, this.Width, this.Height)));
        }
コード例 #3
0
 public Rectangle(XData data)
 {
     this.Data = data;
 }
コード例 #4
0
 public CustomRect(XData data)
 {
     InitializeComponent();
     this.Data = data;
 }
コード例 #5
0
ファイル: CustomRect.cs プロジェクト: kenobit/VectorPaint
        public CustomRect(XData data)
        {
            InitializeComponent();
            this.Data = data;

        }
コード例 #6
0
 public Rectangle(XData data)
 {
     this.Data = data;
 }