Пример #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;
        }
Пример #2
0
 internal D2DSpriteBitmap(D2DSpriteBatch batch, Stream fs)
 {
     this.batch            = batch;
     batch.BatchDisposing += batch_BatchDisposing;
     this.orgBitmap        = (Bitmap)Image.FromStream(fs);
     CreateBitmap();
 }
Пример #3
0
 public override void OnLoad(D2DSpriteBatch batch)
 {
     if (currentScene != null)
     {
         currentScene.OnLoad(batch);
     }
 }
Пример #4
0
 internal D2DSpriteSolidColorBrush(D2DSpriteBatch batch, Color4 color)
 {
     this.batch            = batch;
     this.color            = color;
     batch.BatchDisposing += batch_BatchDisposing;
     Brush = new SolidColorBrush(batch.DWRenderTarget, color);
 }
Пример #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;
        }
Пример #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);
 }
Пример #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;
 }
Пример #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);
 }
Пример #9
0
 public D2DSpriteGradientStopCollection(D2DSpriteBatch batch, GradientStop[] stops, Gamma gamma, ExtendMode mode)
 {
     batch.BatchDisposing += batch_BatchDisposing;
     _extendMode           = mode;
     _gamma = gamma;
     _stops = stops;
     _batch = batch;
 }
Пример #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);
 }
Пример #11
0
        public override void Initialize(RenderContext context = null)
        {
            base.Initialize(context);

#if VSG_DEBUG
#else
            SpriteBatch = new D2DSpriteBatch(RenderContext);
#endif
        }
Пример #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");
 }
Пример #13
0
 protected override void DrawBatch(D2DSpriteBatch batch)
 {
     if (currentScene != null)
     {
         if (!currentScene.IsInitialized)
         {
             currentScene.OnLoad(batch);
         }
         currentScene.RenderSprite(batch);
     }
 }
Пример #14
0
 public D2DSpriteRadialGradientBrush(D2DSpriteBatch batch, GradientStopCollection collection, RadialGradientBrushProperties rgbp)
 {
     this.Brush = new RadialGradientBrush(batch.DWRenderTarget, collection, rgbp);
 }
Пример #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);
 }
Пример #16
0
 public override void OnLoad(D2DSpriteBatch batch)
 {
     if (currentScene != null) currentScene.OnLoad(batch);
 }
Пример #17
0
        protected override void DrawBatch(D2DSpriteBatch batch)
        {
            if (currentScene != null)
            {
                if (!currentScene.IsInitialized) currentScene.OnLoad(batch);
                currentScene.RenderSprite(batch);

            }
        }
Пример #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");
 }