private void RenderFinalImage() { ColorMatrix cm = new ColorMatrix(); ImageAttributes ia = new ImageAttributes(); FinalGraphics.DrawImageUnscaled(MapImage, 0, 0); cm.Matrix33 = 0.5f; ia.SetColorMatrix(cm); FinalGraphics.DrawImage(AttributeMap, new Rectangle(Point.Empty, FinalMapImage.Size), 0, 0, FinalMapImage.Width, FinalMapImage.Height, GraphicsUnit.Pixel, ia); ia.ClearColorMatrix(); }
private void DrawAttribute(int x, int y, int attribute) { ColorMatrix cm = new ColorMatrix(); ImageAttributes ia = new ImageAttributes(); Rectangle DestRect = new Rectangle(x * TileSize, y * TileSize, TileSize, TileSize); Rectangle SrcRect = new Rectangle((attribute % 8) * TileSize, (attribute / 8) * TileSize, TileSize, TileSize); FinalGraphics.DrawImage(MapImage, DestRect, DestRect, GraphicsUnit.Pixel); AttributeGraphics.DrawImage(AttributeBlocks, DestRect, SrcRect, GraphicsUnit.Pixel); cm.Matrix33 = 0.5f; ia.SetColorMatrix(cm); FinalGraphics.DrawImage(AttributeMap, DestRect, x * TileSize, y * TileSize, TileSize, TileSize, GraphicsUnit.Pixel, ia); ia.ClearColorMatrix(); }
private void RenderEvents() { Rectangle EventRect = new Rectangle(0, 0, 16, 16); FinalGraphics.DrawImageUnscaled(MapImage, 0, 0); if (CurrentMap.People != null) { foreach (Person p in CurrentMap.People) { EventRect.X = p.X * 16; EventRect.Y = p.Y * 16; FinalGraphics.DrawImage(PokemonMapEditor.Properties.Resources.Person, EventRect, 0, 0, 16, 16, GraphicsUnit.Pixel); } } if (CurrentPerson != -1 && CurrentPerson < CurrentMap.PersonCount) { FinalGraphics.DrawRectangle(Pens.Red, CurrentMap.People[CurrentPerson].X * 16, CurrentMap.People[CurrentPerson].Y * 16, 16, 16); } }