void IAvnWindowBaseEvents.Resized(AvnSize size) { if (_parent._native != null) { var s = new Size(size.Width, size.Height); _parent._savedLogicalSize = s; _parent.Resized?.Invoke(s); } }
public static Size ToAvaloniaSize(this AvnSize size) { return(new Size(size.Width, size.Height)); }
void IAvnWindowBaseEvents.SoftwareDraw(IntPtr ptr, int stride, int pixelWidth, int pixelHeight, AvnSize logicalSize) { _parent._framebuffer = new SavedFramebuffer { Address = ptr, RowBytes = stride, Width = pixelWidth, Height = pixelHeight, Dpi = new Vector(pixelWidth / logicalSize.Width * 96, pixelHeight / logicalSize.Height * 96) }; _parent.Paint?.Invoke(new Rect(0, 0, logicalSize.Width, logicalSize.Height)); }
void IAvnWindowBaseEvents.Resized(AvnSize size) => _parent.Resized?.Invoke(new Size(size.Width, size.Height));