Ejemplo n.º 1
0
        private void SetResolutionCore()
        {
            if (isLoaded)
            {
                this.SuspendLayout();

                buffer.Resize(Width, Height);

                var position = context.targetPosition;
                context.Dispose();
                context = new LayeredContext(this.Handle, buffer);
                context.targetPosition = position;

                this.Render();

                this.NativeWidth  = this.Width;
                this.NativeHeight = this.Height;

                this.ResumeLayout(false);
            }
        }
Ejemplo n.º 2
0
        protected override void CreateHandle()
        {
            base.CreateHandle();

            this.FormBorderStyle = FormBorderStyle.None;

            winStyle   = this.GetWindowStyle();
            winExStyle = this.GetWindowExtendedStyle();

            UpdateHitVisible();

            // Init client size
            if (this.Width == -1)
            {
                this.Width = this.NativeWidth;
            }

            if (this.Height == -1)
            {
                this.Height = this.NativeHeight;
            }

            // Init buffer
            buffer = new LayeredBuffer(
                this.Width,
                this.Height,
                SKColorType.Bgra8888,
                SKAlphaType.Premul);

            context = new LayeredContext(this.Handle, buffer);
            context.targetPosition = this.Location.ToRawPoint();

            // ready
            isLoaded = true;

            frameTime = DateTime.Now;
        }
Ejemplo n.º 3
0
 public virtual void OnRender(LayeredContext context)
 {
 }