Browse Source

Auto-scale NanoVG by widget scale factor

Signed-off-by: falkTX <falktx@falktx.com>
pull/297/head
falkTX 4 years ago
parent
commit
dc47cb49fe
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      dgl/src/NanoVG.cpp

+ 4
- 1
dgl/src/NanoVG.cpp View File

@@ -287,7 +287,10 @@ void NanoVG::beginFrame(Widget* const widget)
return;

if (TopLevelWidget* const tlw = widget->getTopLevelWidget())
nvgBeginFrame(fContext, static_cast<int>(tlw->getWidth()), static_cast<int>(tlw->getHeight()), 1.0f);
nvgBeginFrame(fContext,
static_cast<int>(tlw->getWidth()),
static_cast<int>(tlw->getHeight()),
tlw->getScaleFactor());
}

void NanoVG::cancelFrame()


Loading…
Cancel
Save