Exemplo n.º 1
0
        private void ImageGraphicsShape(ImageGraphics ig)
        {
            var font = dlgFont.Font;

            ig.DrawLine(Pens.Red, 0, 0, 8, 8);
            ig.DrawRectangle(Pens.Red, 8, 8, 4, 4);
            ig.DrawRectangle(Pens.Red, 16.5f, 16.5f, 4f, 4f);

            var text = tbxExample.Text;

            ig.DrawString(text, font, Brushes.Blue, 50, 50);
            ig.DrawString(text, font, Brushes.Blue, 200, 200, Brushes.Yellow);
        }
Exemplo n.º 2
0
        // 프레임 표시
        private void DrawFrame(ImageGraphics ig)
        {
            var clientSize = pbxDraw.ClientSize;

            for (int ifwd = 0; ifwd < fwdNum; ifwd++)
            {
                int    x1    = (frmW - fwdOvlp) * ifwd;
                PointF ptLTi = new PointF(x1, 0);
                PointF ptRBi = new PointF(x1 + frmW, imgBH);
                PointF ptLTd = pbxDraw.ImgToDisp(ptLTi);
                PointF ptRBd = pbxDraw.ImgToDisp(ptRBi);
                if (ptRBd.Y < 0 || ptLTd.Y >= clientSize.Height || ptRBd.X < 0 || ptLTd.X >= clientSize.Width)
                {
                    continue;
                }

                ig.DrawRectangle(Pens.PowderBlue, ptLTi.X, ptLTi.Y, ptRBi.X - ptLTi.X, ptRBi.Y - ptLTi.Y);

                for (int ifrm = 0; ifrm < frmNum; ifrm++)
                {
                    var ptImg1  = new PointF(x1, frmH * ifrm);
                    var ptImg2  = new PointF(x1 + frmW, frmH * ifrm);
                    var ptDisp1 = pbxDraw.ImgToDisp(ptImg1);
                    var ptDisp2 = pbxDraw.ImgToDisp(ptImg2);

                    if (ptDisp1.Y < 0 || ptDisp1.Y >= clientSize.Height || ptDisp1.X >= clientSize.Width || ptDisp2.X < 0)
                    {
                        continue;
                    }

                    ig.DrawLine(Pens.PowderBlue, ptImg1, ptImg2);
                    if (frmH * pbxDraw.GetZoomFactor() < 20)
                    {
                        continue;
                    }
                    ig.DrawString($"fwd={ifwd}/frm={ifrm}", Font, Brushes.LightBlue, ptImg1);
                }
            }
        }
Exemplo n.º 3
0
 // 홀 정보 표시
 private void DrawHoleInfo(ImageGraphics ig, Hole hole, string infoText, Font font, Brush brush)
 {
     ig.DrawString(infoText, Font, brush, new PointF(hole.x, hole.y));
 }