예제 #1
0
 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);
 }
예제 #2
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;
 }
예제 #3
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();
 }
예제 #4
0
        private static void DisposeThread()
        {
            DisposeActionDelegate?.Invoke();
            PrimaryBuffer.Dispose();
            DirectSoundDevice.Dispose();


            DisposeActionDelegate = null;
            PrimaryBuffer         = null;
            DirectSoundDevice     = null;
        }
예제 #5
0
        private void Update(EvaluationContext context)
        {
            var buffer = PrimaryBuffer.GetValue(context);

            if (buffer == null)
            {
                buffer = Fallback.GetValue(context);
            }

            Output.Value = buffer;
        }