stucork
October 27, 2022, 11:14pm
4
It might not be relevant, but you might find this helpful
https://anvil-extras.readthedocs.io/en/latest/guides/modules/utils.html#correct-canvas-resolution
from anvil_extras.utils import correct_canvas_resolution
class MyForm(MyFormTemplate):
...
def canvas_reset(self, **event_args):
c = self.canvas
correct_canvas_resolution(c)
...
The code is based on this post:
I thought I’d share this for anyone who finds their canvas elements a little blurry.
And if anyone has come up with a different solution I’d be interested to hear more.
Blurry HTML canvas is documented quite a bit online with a number of stack overflow questions on the topic. So not unique to anvil but I wasn’t sure what the anvil approach to this might be.
Following this example , I came up with this idea:
in the canvas_reset call a javascript function - highDPI
highDPI checks the css wid…
1 Like