Beispiel #1
0
        public static void _outtextxy(int x, int y, int z, string s, int angle)
        {
            double xp1, xp2, yp, yp2;

            _to2Da(x, y, z, out xp1, out xp2, out yp);
            _to2Da(x, y + (int)Graph.font.Size, z, out xp1, out xp2, out yp2);
            Font font = new Font(Graph.font.Name, (int)(yp2 - yp) + 1, Graph.font.Style, GraphicsUnit.Pixel);

            //node p = Queues.SearchTexts(s, font);
            //Bitmap pic = null;
            //if (p.data == null)
            //{
            //    SizeF size = Graphics.FromImage(Graph.bitmap.SysDraw).MeasureString(s, font);
            //    p.data = new Bitmap((int)size.Width, (int)size.Height);
            //    pic = (Bitmap)p.data;
            //    Graphics.FromImage(pic.SysDraw).DrawString(s, font, Graph.brush, 0, 0);
            //}
            //else
            //    pic = (Bitmap)p.data;

            SizeF  size = Graphics.FromImage(Graph.bitmap.SysDraw).MeasureString(s, font);
            Bitmap pic  = new Bitmap((int)size.Width, (int)size.Height);

            Graphics.FromImage(pic.SysDraw).DrawString(s, font, Graph.brush, 0, 0);
            Graph3dImage._drawImage(x, y, z, pic.Width, 90, angle, pic.Height, 90, angle - 90, pic, Graph.bitmap);
        }
Beispiel #2
0
        public static void image(int x0, int y0, int z0, int Xscale, int Xfi, int Xteta, int Yscale, int Yfi, int Yteta, Bitmap image)
        {
            bool temp = Graph.imediateDrawing;

            Graph.imediateDrawing = false;
            Graph3dImage.image(x0, y0, z0, Xscale, Xfi, Xteta, Yscale, Yfi, Yteta, image);
            Graph.imediateDrawing = temp;
            if (Graph.imediateDrawing)
            {
                Graph.delay(0);
            }
        }
Beispiel #3
0
        public static void image(int x0, int y0, int z0, int Xscale, int Yscale, Surface s, Bitmap image)
        {
            bool temp = Graph.imediateDrawing;

            Graph.imediateDrawing = false;
            switch (s)
            {
            case Surface.XY:
                Graph3dImage.image(x0, y0, z0, Xscale, 90, 0, Yscale, 90, -90, image); break;

            case Surface.XZ:
                Graph3dImage.image(x0, y0, z0, Xscale, 90, 0, Yscale, 0, -90, image); break;

            case Surface.YZ:
                Graph3dImage.image(x0, y0, z0, Xscale, 0, -90, Yscale, 90, -90, image); break;
            }
            Graph.imediateDrawing = temp;
            if (Graph.imediateDrawing)
            {
                Graph.delay(0);
            }
        }
Beispiel #4
0
 internal static void DrawMouse(Bitmap dest)
 {
     Graph3dImage._drawImage(MouseX, MouseY, MouseZ, mouseCursor.Width, 90, 0, mouseCursor.Height, 90, -90, mouseCursor, dest);
 }