public void Draw(Drawable drawable) { var rgn = new PixelRgn(drawable, false, false); var rectangle = drawable.Bounds; var buf = rgn.GetRect(rectangle); Draw(rectangle, drawable.Type, buf, rectangle.Width * drawable.Bpp); }
public void GetSetRect() { var rgn = new PixelRgn(_drawable, true, false); var rect = new byte[_drawable.Bpp * _width * _height]; for (int i = 0; i < _drawable.Bpp * _width * _height; i++) { rect[i] = 13; } rgn.SetRect(rect, 0, 0, _width, _height); var result = rgn.GetRect(0, 0, _width, _height); Assert.AreEqual(rect, result); }
public override void initBuffer() { PixelRgn rgn = new PixelRgn(_drawable, false, false); _imageBuffer = rgn.GetRect(_rectangle.X1, _rectangle.Y1, _rectangle.Width, _rectangle.Height); }