public void RenderContent(RenderLayer context, SpriteBatch spriteBatch) { _renderCore.RenderContent(context, spriteBatch); }
public void RenderContent(RenderLayer context, DrawBatch drawBatch) { _renderCore.RenderContent(context, drawBatch); }
public virtual void RenderContent(RenderLayer context, SpriteBatch spriteBatch) { }
public virtual void RenderContent(RenderLayer context, DrawBatch drawBatch) { }
public virtual void RenderCore(RenderLayer context, DrawBatch drawBatch) { }
public virtual void RenderCore(RenderLayer context, SpriteBatch spriteBatch) { }
public void RenderCore(RenderLayer context, DrawBatch drawBatch) { _renderCore.RenderCore(context, drawBatch); }
public void RenderCore(RenderLayer context, SpriteBatch spriteBatch) { _renderCore.RenderCore(context, spriteBatch); }
public override void RenderContent(RenderLayer renderContext, SpriteBatch spriteBatch) { Dictionary<string, Texture2D> brushClassOverlays = _form._brushClassOverlays; DynamicTileBrush brush = _form._brush; if (!brushClassOverlays.ContainsKey(brush.BrushClass.ClassName)) { System.Drawing.Bitmap overlayBitmap = null; if (brush.BrushClass.ClassName == "Basic") overlayBitmap = Properties.Resources.DynBrushBasic; else if (brush.BrushClass.ClassName == "Extended") overlayBitmap = Properties.Resources.DynBrushExtended; else return; TextureResource overlayResource = TextureResourceBitmapExt.CreateTextureResource(overlayBitmap); brushClassOverlays.Add(brush.BrushClass.ClassName, overlayResource.CreateTexture(spriteBatch.GraphicsDevice)); } Texture2D overlay = brushClassOverlays[brush.BrushClass.ClassName]; int width = (int)(overlay.Width * renderContext.LevelGeometry.ZoomFactor * (brush.TileWidth / 16.0)); int height = (int)(overlay.Height * renderContext.LevelGeometry.ZoomFactor * (brush.TileHeight / 16.0)); Microsoft.Xna.Framework.Rectangle dstRect = new Microsoft.Xna.Framework.Rectangle(0, 0, width, height); spriteBatch.Draw(overlay, dstRect, new Microsoft.Xna.Framework.Color(1f, 1f, 1f, .5f)); }