Exemplo n.º 1
0
        /// <summary>
        /// 创建六十四卦方圆图
        /// </summary>
        /// <returns></returns>
        public Bitmap CreateLiuSiGuaRectangleCircelBitmap(Bitmap sourceBitmap, float r)
        {
            //计算圆心
            var o = new PointF(sourceBitmap.Width / 2, sourceBitmap.Height / 2);

            var NB = o.CirclePointfForZBC(r) * 2;


            var fGuaWidth = ((NB / 8) * 4) / 5;

            var fGuaHeigth = (NB / 8) / 15;

            var fGuaMidWidth = fGuaWidth / 10;


            var circleR = r + 6 * fGuaHeigth;

            CreateLiuSiGuaCircleBitmap(sourceBitmap, (int)fGuaWidth / 2, (int)fGuaMidWidth / 2, (int)fGuaHeigth / 2, (int)circleR);
            var bitmapRectangle = new Bitmap((int)NB, (int)NB + 20);
            var rectanglePoint  = o.CirclePointF(-135, r);

            CreateLiuSiguaRectangleBitmap(bitmapRectangle, (int)fGuaWidth, (int)fGuaMidWidth, (int)fGuaHeigth);

            var graph = Graphics.FromImage(sourceBitmap);

            graph.DrawImage(bitmapRectangle, rectanglePoint);

            return(sourceBitmap);
        }