Beispiel #1
0
            public void Render(
                RenderingEnv env,
                ReportDesign reportDesign,
                Region region,
                ElementDesign design,
                object data)
            {
                Region r = region.ToPointScale(reportDesign);
                Single x = r.Left + r.GetWidth() / 2;
                Single y = r.Top + r.GetHeight() / 2;
                Single w = 12;

                env.Graphics.DrawRectangle(Pens.Black, x - w / 2, y - w / 2, w, w);
                if ((bool)data)
                {
                    Point[] p =
                    {
                        new Point((int)(x - w / 2), (int)(y - w / 4)),
                        new Point((int)(x - w / 4), (int)(y + w / 2)),
                        new Point((int)(x + w / 2), (int)(y - w / 2)),
                        new Point((int)(x - w / 4), (int)(y))
                    };
                    env.Graphics.FillPolygon(Brushes.SteelBlue, p);
                }
            }
 public void Render(
     RenderingEnv env,
     ReportDesign reportDesign,
     Region region,
     ElementDesign design,
     object data)
 {
     Region r = region.ToPointScale(reportDesign);
     Single x = r.Left + r.GetWidth() / 2;
     Single y = r.Top + r.GetHeight() / 2;
     Single w = 12;
     env.Graphics.DrawRectangle(Pens.Black, x - w / 2, y - w / 2, w, w);
     if ((bool)data)
     {
         Point[] p = {
           new Point((int)(x - w / 2), (int)(y - w / 4)),
           new Point((int)(x - w / 4), (int)(y + w / 2)),
           new Point((int)(x + w / 2), (int)(y - w / 2)),
           new Point((int)(x - w / 4), (int)(y))};
         env.Graphics.FillPolygon(Brushes.SteelBlue, p);
     }
 }