Skip to content

Commit

Permalink
update hidpi buffer size (not sure why though)
Browse files Browse the repository at this point in the history
  • Loading branch information
yatli committed May 6, 2019
1 parent 340ffb3 commit 2ca4890
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Editor.xaml.fs
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,12 @@ type Editor() as this =
grid_scale <- this.GetVisualRoot().RenderScaling
trace "redraw" "RenderScaling is %f" grid_scale
#if USE_FRAMEBUFFER
let size = grid_scale * getPoint grid_size.rows grid_size.cols
let size = grid_scale * grid_scale * getPoint grid_size.rows grid_size.cols
let scale_rt = sqrt grid_scale
let pxsize = PixelSize(int <| Math.Ceiling size.X, int <| Math.Ceiling size.Y)
this.DestroyFramebuffer()

grid_fb <- new RenderTargetBitmap(pxsize, Vector(96.0 * scale_rt, 96.0 * scale_rt))
grid_fb <- new RenderTargetBitmap(pxsize, Vector(96.0 * grid_scale, 96.0 * grid_scale))
grid_dc <- grid_fb.CreateDrawingContext(null)

#endif
Expand Down

0 comments on commit 2ca4890

Please sign in to comment.