protected sealed override void ResetDataInternally(int width, int height) { if (PrimaryBuffer is IResizeable) (PrimaryBuffer as IResizeable).Resize(width, height); else PrimaryBuffer = PrimaryBuffer.ResizedData(width, height); }
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; }
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(); }
private static void DisposeThread() { DisposeActionDelegate?.Invoke(); PrimaryBuffer.Dispose(); DirectSoundDevice.Dispose(); DisposeActionDelegate = null; PrimaryBuffer = null; DirectSoundDevice = null; }
private void Update(EvaluationContext context) { var buffer = PrimaryBuffer.GetValue(context); if (buffer == null) { buffer = Fallback.GetValue(context); } Output.Value = buffer; }