コード例 #1
0
ファイル: InputRoll.cs プロジェクト: stuff2600/RAEmus
        private void DrawColumnBg(GDIRenderer ntr, PaintEventArgs e)
        {
            ntr.SetBrush(SystemColors.ControlLight);

            if (HorizontalOrientation)
            {
                var colWidth = HorizontalOrientedColumnWidth;
                ntr.DrawRectangle(0, 0, colWidth, Height - 2);
                ntr.FillRectangle(1, 1, colWidth - 1, Height - 3);

                int start = 0;
                foreach (var column in Columns)
                {
                    start += CellHeight;
                    ntr.Line(0, start, colWidth, start);
                }
            }
            else
            {
                ntr.DrawRectangle(0, 0, Width - 2, CellHeight);
                ntr.FillRectangle(1, 1, Width - 3, CellHeight - 1);

                int start = 0;
                foreach (var column in Columns)
                {
                    start += column.Width;
                    ntr.Line(start, 0, start, CellHeight);
                }
            }
        }
コード例 #2
0
ファイル: InputRoll.cs プロジェクト: stuff2600/RAEmus
        private void DrawBg(GDIRenderer ntr, PaintEventArgs e)
        {
            var start = StartBg;

            ntr.SetBrush(Color.White);
            ntr.FillRectangle(StartBg.X, StartBg.Y, Width, Height);
            ntr.DrawRectangle(StartBg.X, StartBg.Y, Width, Height);

            if (HorizontalOrientation)
            {
            }
            else
            {
            }
        }
コード例 #3
0
        protected override void OnPaint(PaintEventArgs e)
        {
            using (var LCK = Gdi.LockGraphics(e.Graphics))
            {
                Gdi.StartOffScreenBitmap(Width, Height);

                // White Background
                Gdi.SetBrush(Color.White);
                Gdi.SetSolidPen(Color.White);
                Gdi.FillRectangle(0, 0, Width, Height);


                Gdi.DrawString("Hello World", new Point(10, 10));

                Gdi.CopyToScreen();
                Gdi.EndOffScreenBitmap();
            }
        }