Ejemplo n.º 1
0
        private void BuildOneTile(TileData redData, TileData greenData, TileData blueData, int x, int y, Rectangle rasterWindowEnvelope, Graphics g)
        {
            LevelId lv      = _tileComputer.Levels[redData.Tile.LevelNo];
            int     w       = redData.Tile.Width;
            int     h       = redData.Tile.Height;
            Bitmap  tBitmap = new Bitmap(w, h, PixelFormat.Format24bppRgb);

            using (IBitmapBuilder <byte> builder = BitmapBuilderFactory.CreateBitmapBuilderByte())
            {
                builder.Build(w, h, redData.Data as byte[],
                              greenData.Data as byte[],
                              blueData.Data as byte[], ref tBitmap);
            }
            g.DrawImage(tBitmap, x, y);
            tBitmap.Dispose();
        }
Ejemplo n.º 2
0
 protected override IBitmapBuilder <byte> GetBitmapBuilder()
 {
     return(BitmapBuilderFactory.CreateBitmapBuilderByte());
 }