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; }
internal D2DSpriteBitmap(D2DSpriteBatch batch, Stream fs) { this.batch = batch; batch.BatchDisposing += batch_BatchDisposing; this.orgBitmap = (Bitmap)Image.FromStream(fs); CreateBitmap(); }
public override void OnLoad(D2DSpriteBatch batch) { if (currentScene != null) { currentScene.OnLoad(batch); } }
internal D2DSpriteSolidColorBrush(D2DSpriteBatch batch, Color4 color) { this.batch = batch; this.color = color; batch.BatchDisposing += batch_BatchDisposing; Brush = new SolidColorBrush(batch.DWRenderTarget, color); }
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; }
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); }
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; }
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); }
public D2DSpriteGradientStopCollection(D2DSpriteBatch batch, GradientStop[] stops, Gamma gamma, ExtendMode mode) { batch.BatchDisposing += batch_BatchDisposing; _extendMode = mode; _gamma = gamma; _stops = stops; _batch = batch; }
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); }
public override void Initialize(RenderContext context = null) { base.Initialize(context); #if VSG_DEBUG #else SpriteBatch = new D2DSpriteBatch(RenderContext); #endif }
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"); }
protected override void DrawBatch(D2DSpriteBatch batch) { if (currentScene != null) { if (!currentScene.IsInitialized) { currentScene.OnLoad(batch); } currentScene.RenderSprite(batch); } }
public D2DSpriteRadialGradientBrush(D2DSpriteBatch batch, GradientStopCollection collection, RadialGradientBrushProperties rgbp) { this.Brush = new RadialGradientBrush(batch.DWRenderTarget, collection, rgbp); }
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); }
public override void OnLoad(D2DSpriteBatch batch) { if (currentScene != null) currentScene.OnLoad(batch); }
protected override void DrawBatch(D2DSpriteBatch batch) { if (currentScene != null) { if (!currentScene.IsInitialized) currentScene.OnLoad(batch); currentScene.RenderSprite(batch); } }
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"); }