コード例 #1
0
ファイル: CairoBackend.cs プロジェクト: kuggaa/longomatch
        public Area UserToDevice(Area a)
        {
            double x, y, x2, y2, x3, y3;

            x = a.Start.X;
            y = a.Start.Y;
            CContext.UserToDevice(ref x, ref y);
            Area ua = new Area(new Point(x, y), 0, 0);

            x2 = a.TopRight.X;
            y2 = a.TopRight.Y;
            CContext.UserToDevice(ref x2, ref y2);
            ua.Width = x2 - x;
            x3       = a.BottomLeft.X;
            y3       = a.BottomLeft.Y;
            CContext.UserToDevice(ref x3, ref y3);
            ua.Height = y3 - y;
            return(ua);
        }