Example #1
0
        public void SetRotateCenter(double trd)
        {
            pf_UpdateMatrix(delegate(Matrix tmtr)
            {
                double tyrd = RxGeom.GetRadian1(tmtr);
                double tnrd = RxGeom.CheckRadian(trd);
                if (tnrd != tyrd)
                {
                    double tcx = RxGeom.GetLeftCenter(_rctBounds);
                    double tcy = RxGeom.GetTopCenter(_rctBounds);
                    tmtr.Translate(-tcx, -tcy);

                    tmtr.Rotate(-RxGeom.GetRadianToAngle(tyrd));
                    tmtr.Rotate(RxGeom.GetRadianToAngle(tnrd));
                    tmtr.Translate(tcx, tcy);
                }

                return(tmtr);
            });
        }