Beispiel #1
0
        private void FillPoint(CPoint p1, Color clr)
        {
            var np    = NPt(p1);
            var gr    = Graphics.FromImage(pictureBox.Image);
            var bgClr = RG.GetColorReversed(new CPoint(p1), CProjection.UpC1C2);
            var blend = RG.Blend(clr, bgClr);

            gr.TryDraw(g => g.FillEllipse(new SolidBrush(clr), np.X - 2, np.Y - 2, 4, 4));
            gr.TryDraw(g => g.DrawRectangle(new Pen(blend), np.X - 10, np.Y - 10, 20, 20));
        }
Beispiel #2
0
        private void FillPixel(Bitmap bmp, double x, double y)
        {
            var c1 = x;
            var c2 = y;
            var rd = c1 * c1 + c2 * c2;
            var c0 = 1 - rd;
            var pt = NPt(c1, c2);

            if (rd <= 1)
            {
                c0 = Math.Sqrt(c0);
                var cpt   = new CPoint(c0, c1, c2);
                var color = RG.GetColorReversed(cpt, CProjection.UpC1C2);
                SetPixel(bmp, pt.X, pt.Y, color);
            }
            else
            {
                SetPixel(bmp, pt.X, pt.Y, Config.White);
            }
        }