Exemplo n.º 1
0
 protected override GwsGraphics Clone(int? width = null, int? height = null)
 {
     var canvas = base.Clone(width, height) as Graphics;
     var rc = this.CompitibleRC(0, 0, width?? Width, height?? PrimaryBuffer.Height);
     PrimaryBuffer.CopyMemoryTo(canvas.PrimaryBuffer, rc, 0, 0);
     return canvas;
 }
Exemplo n.º 2
0
 protected sealed override void ResetDataInternally(int width, int height)
 {
     var newBuffer = new SdlBuffer(width, height);
     var srcRc = this.CompitibleRC(null, null, width, height);
     PrimaryBuffer.CopyMemoryTo(newBuffer, srcRc, 0, 0);
     PrimaryBuffer.Dispose();
     PrimaryBuffer = newBuffer;
     Handle = newBuffer.Handle;
     ID = "Surface" + Handle.ToString();
 }