ImageScaledCache constructor
ImageScaledCache(
- CanvasImageSource _image, [
- int? width,
- int? height,
- int? maxScaleCacheEntries,
Implementation
ImageScaledCache(this._image,
[int? width, int? height, int? maxScaleCacheEntries]) {
if (width == null || height == null) {
var wh = getImageDimension(_image)!;
width ??= wh.width;
height ??= wh.height;
}
_width = width;
_height = height;
_maxScaleCacheEntries =
maxScaleCacheEntries != null && maxScaleCacheEntries > 0
? maxScaleCacheEntries
: 2;
}