Fixing ugly canvas. now full browser window, fixing dpi blurry issue
This commit is contained in:
parent
86996ed4ef
commit
58715f42bf
4 changed files with 45 additions and 11 deletions
|
|
@ -25,7 +25,12 @@ let focusedInputSubmit: Value | null = null;
|
|||
export function render(ui: UIValue, canvas: HTMLCanvasElement) {
|
||||
const ctx = canvas.getContext('2d');
|
||||
if (ctx) {
|
||||
const dpr = window.devicePixelRatio || 1;
|
||||
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
|
||||
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
||||
|
||||
clickRegions = [];
|
||||
textInputRegions = [];
|
||||
renderUI(ui, ctx, 0, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue