public void SetLocalRect(int x, int y, int w, int h) { DisposeSizeDependent(); _rect.SetLocalRect(x, y, w, h); h = h / 2; if (_top != null) { _top.SetLocalRect(x, y, w, h); } if (_bottom != null) { _bottom.SetLocalRect(x, y + h, w, h); } }
private void D3DContent_SizeChanged(object sender, EventArgs e) { _drawable.SetLocalRect(0, 0, ClientSize.Width, ClientSize.Height); if (_backbuffer != null) { _backbuffer.Dispose(); _backbuffer = null; } if (_device.SwapChain != null) { _device.SwapChain.Resize(ClientSize.Width, ClientSize.Height); } Invalidate(); }
public override void SetLocalRect(int x, int y, int w, int h) { base.Dispose(); _drawable?.SetLocalRect(x, y, w, h); }