public void DrawTile(Tile tile, Location location) { Tiling.Rectangle imageBounds = tile.TileSheet.GetTileImageBounds(tile.TileIndex); Bitmap bitmap = m_tileSheetBitmaps[tile.TileSheet]; System.Drawing.Rectangle imageBoundsGDIP = new System.Drawing.Rectangle( imageBounds.Location.X, imageBounds.Location.Y, imageBounds.Size.Width, imageBounds.Size.Height); m_graphics.DrawImage(bitmap, location.X, location.Y, imageBoundsGDIP, GraphicsUnit.Pixel); }
public void SetClippingRegion(Tiling.Rectangle clippingRegion) { m_graphics.SetClip(new RectangleF( clippingRegion.Location.X, clippingRegion.Location.Y, clippingRegion.Size.Width, clippingRegion.Size.Height)); }