Ejemplo n.º 1
0
 private void getImageInfo(IBitmap bitmap, int cellX, int cellY, ISpriteSheet spriteSheet,
                           ILoadImageConfig loadConfig, string filePath,
                           out Rectangle rect, out IBitmap clone, out string path, out ITexture texture)
 {
     texture = new GLTexture(loadConfig.TextureConfig, _graphics);
     rect    = new Rectangle(cellX * spriteSheet.CellWidth,
                             cellY * spriteSheet.CellHeight, spriteSheet.CellWidth, spriteSheet.CellHeight);
     clone = bitmap.Crop(rect);
     path  = string.Format("{0}_{1}_{2}", rect.X, rect.Y, filePath);
 }
Ejemplo n.º 2
0
 private void getImageInfo(IBitmap bitmap, int cellX, int cellY, ISpriteSheet spriteSheet,
                           ILoadImageConfig loadConfig, string filePath,
                           out Rectangle rect, out IBitmap clone, out string path, out ITexture texture)
 {
     texture = new GLTexture(loadConfig.TextureConfig, _graphics, _messagePump);
     rect    = new Rectangle(cellX * spriteSheet.CellWidth,
                             cellY * spriteSheet.CellHeight, spriteSheet.CellWidth, spriteSheet.CellHeight);
     clone = bitmap.Crop(rect);
     path  = $"{rect.X}_{rect.Y}_{filePath}";
 }
Ejemplo n.º 3
0
		private void getImageInfo(IBitmap bitmap, int cellX, int cellY, ISpriteSheet spriteSheet, 
                                  ILoadImageConfig loadConfig, string filePath, 
                                  out Rectangle rect, out IBitmap clone, out string path, out ITexture texture)
		{
            texture = new GLTexture(loadConfig.TextureConfig, _graphics);
			rect = new Rectangle (cellX * spriteSheet.CellWidth,
										cellY * spriteSheet.CellHeight, spriteSheet.CellWidth, spriteSheet.CellHeight);
			clone = bitmap.Crop (rect);
			path = string.Format ("{0}_{1}_{2}", rect.X, rect.Y, filePath);
		}