RenderTexture constructor

RenderTexture({
  1. required int width,
  2. required int height,
  3. RenderTextureUpdate update = RenderTextureUpdate.everyFrame,
  4. RenderTextureSampling sampling = const RenderTextureSampling(),
  5. bool linearColor = false,
})

Creates a render target of width x height physical pixels.

Implementation

RenderTexture({
  required int width,
  required int height,
  this.update = RenderTextureUpdate.everyFrame,
  this.sampling = const RenderTextureSampling(),
  this.linearColor = false,
}) : assert(width > 0 && height > 0, 'RenderTexture size must be positive'),
     _size = ui.Size(width.toDouble(), height.toDouble());