Exemplo n.º 1
0
        public virtual void Polygon(Point [] pts, int npts, RGBColor fore, int alphaFill, int alphaOutline)
        {
            // Convert from SinkWorld Point array to system Point array
            System.Drawing.Point[] poly = new System.Drawing.Point[npts];
            for (int i = 0; i < npts; i++)
            {
                poly[i] = new System.Drawing.Point(pts[i].x, pts[i].y);
            }
            Color colFill = Color.FromArgb(alphaFill, (int)fore.GetRed(), (int)fore.GetGreen(), (int)fore.GetBlue());

            g.FillPolygon(new SolidBrush(colFill), poly);
            Color colOutline = Color.FromArgb(alphaOutline, (int)fore.GetRed(), (int)fore.GetGreen(), (int)fore.GetBlue());

            g.DrawPolygon(new Pen(colOutline, 0.0f), poly);
        }
Exemplo n.º 2
0
 public virtual void SetPen(RGBColor color)
 {
     if (currentColor.NotEqual(color))
     {
         Color col = Color.FromArgb((int)color.GetRed(), (int)color.GetGreen(), (int)color.GetBlue());
         textBrush       = new SolidBrush(col);
         linePen         = new Pen(col, 1.0f);
         currentColor.co = color.co;
     }
 }