Beispiel #1
0
 public void CreateTestShape(Microsoft.DirectX.Direct3D.Device video_device)
 {
     _graphics_path.AddEllipse(46, 4, 28, 28);
     _graphics_path.AddLine(36, 32, 84, 32);
     _graphics_path.AddLine(100, 80, 88, 84);
     _graphics_path.AddLine(76, 50, 74, 84);
     _graphics_path.AddLine(90, 150, 74, 150);
     _graphics_path.AddLine(60, 100, 46, 150);
     _graphics_path.AddLine(32, 150, 46, 84);
     _graphics_path.AddLine(44, 50, 32, 84);
     _graphics_path.AddLine(20, 80, 36, 32);
     _image = AGT_GDIBridge.CreatePolygon(video_device, _graphics_path, Pen);
 }
Beispiel #2
0
        public Bitmap ToBitmap(Microsoft.DirectX.Direct3D.Device video_device)
        {
            switch (FillMode)
            {
            case FillModeType.Fill:
                _image = AGT_GDIBridge.CreateFillPolygon(video_device, _graphics_path, Brush);
                break;

            case FillModeType.Outline:
            case FillModeType.None:
                _image = AGT_GDIBridge.CreatePolygon(video_device, _graphics_path, Pen);
                break;
            }
            return(_image);
        }
Beispiel #3
0
        public void LoadResources(AGT_SplashDialog dialog_instance, Device device)
        {
            dialog_instance.UpdateStatusBar("Initializing Sprite Manager", 0, 3);

            sprites = new AGT_SpriteManager(device);

            dialog_instance.UpdateStatusBar("Loading Ramadi Map", 1, 3);
            sprites.AddResource("Ramadi", "Resources\\Map2.jpg", 0, 0, 0, false);

            dialog_instance.UpdateStatusBar("Loading Active Zones", 2, 3);
            using (Bitmap b = AGT_GDIBridge.CreateCircle(device, 200, new HatchBrush(HatchStyle.DashedDownwardDiagonal, Color.FromArgb(180, Color.Black), Color.FromArgb(180, Color.White))))
            {
                active_zone = sprites.AddResource("ActiveZone", b, 100, 100, 0);
            }

            dialog_instance.UpdateStatusBar("Finished", 3, 3);
        }