コード例 #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);
 }
コード例 #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}";
 }
コード例 #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);
		}