op/paint: add support for efficient ImageOp subimages

The new field ImageOp.Rect is initialized to cover the entire source
image, but can be modified to draw only a section of it.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-13 13:02:41 +01:00
parent fd5dfacb40
commit 69dfd2e3a5
4 changed files with 22 additions and 8 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ const (
TypeTransformLen = 1 + 4*2
TypeLayerLen = 1
TypeRedrawLen = 1 + 8
TypeImageLen = 1
TypeImageLen = 1 + 4*4
TypePaintLen = 1 + 4*4
TypeColorLen = 1 + 4
TypeAreaLen = 1 + 1 + 4*4