title: Flutter - How to move and zoom Canvas drawings without AGAIN running something like the CustomPainter paint method?
body: <p>I have tried using the methods &quot;Transform.scale&quot; (for &quot;zooming&quot; ) and &quot;Transform.translate&quot; (for the moving), but they seem to trigger the paint method in the CustomPainter.<br />
  (even though the method &quot;shouldRepaint&quot; returns false, but that method is not even invoked)<br />
  Maybe there is some other way of doing what I want i.e. be able to move and zoom something I have created with a Canvas (without again executing the paint method)?</p>
  <p>In the below example code there are three sliders, one for zooming out (i.e. reducing the size) and one for moving horizontally and one for moving vertically.<br />
  The &quot;paint&quot; method simply draws a polygon (see the below attached screenshot picture).</p>
  <p>While the example code below is simple (i.e. small amount of hardcoded vector data and fast to render), I want to emphasize that the solution I am looking for need to support MANY complicated drawings (with LOTS OF data, slow to render), i.e. it is not an acceptable solution to suggest something like instead manually converting this one vector image to a raster image (e.g. PNG/JPG/GIF).</p>
  <p>Below I try do describe how you can think regarding a scenario that need to be supported:<br />
  Imagine you want to implement an app with a huge dropdown list with lots of different vector data images to be selected.<br />
  The data of those VECTOR images may be retrieved from the internet or from a big local SQLite database.<br />
  IMPORTANT: The DATA in those images are NOT raster images such as jpg, png, gif... but the VECTOR data to become retrieved is defined as lots of screen coordinates for points, lines, polygons, and textual labels, and icons, and color values... and so on.<br />
  Such VECTOR data will then be used for creating the image, and as far as I understand you should use CustomPainter with the paint method unless there are better options?<br />
  Also imagine that each of such selected image with vector data is HUGE with MANY THOUSANDS of lines, polygons, icons, ... and so on, and that the paint method might take seconds for creating the image.<br />
  BUT, once it is drawn the data will not change.<br />
  So, since the &quot;paint&quot; method might take seconds to render a huge amount of vector data, you want to avoid invoking it frequently, when moving or zooming.<br />
  Therefore I think it would be desirable if it would be possible to use the method &quot;shouldRepaint&quot; to return false, but it seems as that method is not even invoked at all when resizing or moving with the  Transform methods &quot;scale&quot; and &quot;translate&quot;.<br />
  But maybe there is some other solution to support the above described scenario, maybe some other class than CustomPainter that do not automatically trigger the paint method when applying Transform scale/translate ?<br />
  I hope there is a solution with the Flutter framework somehow being able to automatically reuse the bitmap (e.g color values at certain bits and bytes) that was created potentially slowly with a paint method but can scale/zoom and move it in a faster way than having to execute the paint method again.  <a href="https://i.stack.imgur.com/Q8u3p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q8u3p.png" alt="enter image description here" /></a></p>