pixelRatio property
The current pixel ration of this canvas. See devicePixelRatio.
Implementation
@override
num get pixelRatio => _pixelRatio;
Sets the pixel ration of this canvas and refreshes it.
Implementation
@override
set pixelRatio(num pr) {
if (_pixelRatio != pr) {
var n = pr.toInt();
if (n != pr) {
var pr2 = double.tryParse(pr.toStringAsFixed(4));
pr = pr2 ?? pr;
}
_pixelRatio = pr;
checkDimension();
refresh();
}
}