Exemplo n.º 1
0
        protected override void OnLoad(EventArgs e)
        {
            #region Design mode when processing

            if (this.DesignMode)
            {
                var label = new Label();
                label.Text      = "D2DSuppurtedRenderForm\n* It can not be drawn in the design mode. \n * window of size, such as the title is also can be changed from the design view.";
                label.Dock      = DockStyle.Fill;
                label.TextAlign = ContentAlignment.MiddleCenter;
                label.Font      = new Font("Arial", 16);
                this.Controls.Add(label);
                return;
            }

            #endregion

            base.OnLoad(e);
#if VSG_DEBUG
#else
            this.RenderContext.SetRenderScreen(this.ScreenContext);
            this.SpriteBatch = new D2DSpriteBatch(this.RenderContext);
#endif
            ClientSizeChanged += D2DSupportedRenderForm_ClientSizeChanged;
            this.IsInitialized = true;
        }
Exemplo n.º 2
0
 internal D2DSpriteBitmap(D2DSpriteBatch batch, Stream fs)
 {
     this.batch            = batch;
     batch.BatchDisposing += batch_BatchDisposing;
     this.orgBitmap        = (Bitmap)Image.FromStream(fs);
     CreateBitmap();
 }
Exemplo n.º 3
0
 public override void OnLoad(D2DSpriteBatch batch)
 {
     if (currentScene != null)
     {
         currentScene.OnLoad(batch);
     }
 }
Exemplo n.º 4
0
 internal D2DSpriteSolidColorBrush(D2DSpriteBatch batch, Color4 color)
 {
     this.batch            = batch;
     this.color            = color;
     batch.BatchDisposing += batch_BatchDisposing;
     Brush = new SolidColorBrush(batch.DWRenderTarget, color);
 }
Exemplo n.º 5
0
        protected override void OnLoad(EventArgs e)
        {
            #region デザインモード時処理

            if (DesignMode)
            {
                var label = new Label();
                label.Text      = "D2DSuppurtedRenderForm\n*デザインモードでは描画できません。\n*ウィンドウの大きさ、タイトルなどはデザインビューからも変更可能です。";
                label.Dock      = DockStyle.Fill;
                label.TextAlign = ContentAlignment.MiddleCenter;
                label.Font      = new Font("Meiriyo", 30);
                Controls.Add(label);
                return;
            }

            #endregion

            base.OnLoad(e);
#if VSG_DEBUG
#else
            RenderContext.SetRenderScreen(ScreenContext);
            SpriteBatch = new D2DSpriteBatch(RenderContext);
#endif
            ClientSizeChanged += D2DSupportedRenderForm_ClientSizeChanged;
            IsInitialized      = true;
        }
Exemplo n.º 6
0
 public PlayerDescription(D2DSpriteBatch batch, string charaName, string s1, string s2, string s3, string img)
 {
     charactorName = charaName;
     skillName_1   = s1;
     skillName_2   = s2;
     skillName_3   = s3;
     image         = batch.CreateBitmap(@img);
 }
Exemplo n.º 7
0
 public D2DSpriteBitmapBrush(D2DSpriteBatch batch, D2DSpriteBitmap bitmap, BitmapBrushProperties bbp)
 {
     this._bitmap = bitmap;
     this._batch  = batch;
     this._bitmapBrushProperties = bbp;
     this.Brush = new BitmapBrush(batch.DWRenderTarget, this._bitmap, bbp);
     this._batch.BatchDisposing += _batch_BatchDisposing;
 }
Exemplo n.º 8
0
 public PlayerDescription(D2DSpriteBatch batch,string charaName,string s1,string s2,string s3,string img)
 {
     charactorName = charaName;
     skillName_1 = s1;
     skillName_2 = s2;
     skillName_3 = s3;
     image =  batch.CreateBitmap(@img);
 }
Exemplo n.º 9
0
 public D2DSpriteGradientStopCollection(D2DSpriteBatch batch, GradientStop[] stops, Gamma gamma, ExtendMode mode)
 {
     batch.BatchDisposing += batch_BatchDisposing;
     _extendMode           = mode;
     _gamma = gamma;
     _stops = stops;
     _batch = batch;
 }
Exemplo n.º 10
0
 public D2DSpriteLinearGradientBrush(D2DSpriteBatch batch, D2DSpriteGradientStopCollection gradientStops,
                                     LinearGradientBrushProperties lgbp)
 {
     _linearGradientBrushProperties = lgbp;
     _gradientStops        = gradientStops;
     _batch                = batch;
     batch.BatchDisposing += batch_BatchDisposing;
     Brush = new LinearGradientBrush(_batch.DWRenderTarget, _gradientStops.GradientStopCollection, _linearGradientBrushProperties);
 }
Exemplo n.º 11
0
        public override void Initialize(RenderContext context = null)
        {
            base.Initialize(context);

#if VSG_DEBUG
#else
            SpriteBatch = new D2DSpriteBatch(RenderContext);
#endif
        }
Exemplo n.º 12
0
 public void InitializePlayerDescriptions(D2DSpriteBatch batch)
 {
     if (playerDescriptions != null)
     {
         return;
     }
     playerDescriptions    = new PlayerDescription[charactorCount];
     playerDescriptions[0] = new PlayerDescription(batch, "八頭身モナー", "たま", "なみ", "おこる", "..\\..\\..\\hattousin.gif");
     playerDescriptions[1] = new PlayerDescription(batch, "初音ミク", "ネギビーム", "ネギカッター", "ネギバースト", "..\\..\\..\\miku.png");
 }
Exemplo n.º 13
0
 protected override void DrawBatch(D2DSpriteBatch batch)
 {
     if (currentScene != null)
     {
         if (!currentScene.IsInitialized)
         {
             currentScene.OnLoad(batch);
         }
         currentScene.RenderSprite(batch);
     }
 }
Exemplo n.º 14
0
 public D2DSpriteRadialGradientBrush(D2DSpriteBatch batch, GradientStopCollection collection, RadialGradientBrushProperties rgbp)
 {
     this.Brush = new RadialGradientBrush(batch.DWRenderTarget, collection, rgbp);
 }
Exemplo n.º 15
0
 internal D2DSpriteTextformat(D2DSpriteBatch batch, string fontFamiry, int size, FontWeight weight,
                              FontStyle style, FontStretch stretch, string locale)
 {
     batch.BatchDisposing += batch_BatchDisposing;
     this.Format           = new TextFormat(batch.context.DWFactory, fontFamiry, weight, style, stretch, size, locale);
 }
Exemplo n.º 16
0
 public override void OnLoad(D2DSpriteBatch batch)
 {
     if (currentScene != null) currentScene.OnLoad(batch);
 }
Exemplo n.º 17
0
        protected override void DrawBatch(D2DSpriteBatch batch)
        {
            if (currentScene != null)
            {
                if (!currentScene.IsInitialized) currentScene.OnLoad(batch);
                currentScene.RenderSprite(batch);

            }
        }
Exemplo n.º 18
0
 public void InitializePlayerDescriptions(D2DSpriteBatch batch)
 {
     if (playerDescriptions != null) return;
     playerDescriptions = new PlayerDescription[charactorCount];
     playerDescriptions[0] = new PlayerDescription(batch, "八頭身モナー", "たま", "なみ", "おこる", "..\\..\\..\\hattousin.gif");
     playerDescriptions[1] = new PlayerDescription(batch, "初音ミク", "ネギビーム", "ネギカッター", "ネギバースト", "..\\..\\..\\miku.png");
 }