Ejemplo n.º 1
0
 public IBitmap Crop(AGS.API.Rectangle cropRect)
 {
     return(new DesktopBitmap(_bitmap.Clone(cropRect.Convert(), _bitmap.PixelFormat), _graphics)); //todo: improve performance by using FastBitmap
 }
Ejemplo n.º 2
0
 public IBitmap Crop(AGS.API.Rectangle cropRect)
 {
     return(new AndroidBitmap(Bitmap.CreateBitmap(_bitmap, cropRect.X, cropRect.Y, cropRect.Width, cropRect.Height), _graphics)); //todo: improve performance by using FastBitmap
 }
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);
		}