Commit Graph

12 Commits

Author SHA1 Message Date
Elias Naur 4da6c57d83 op: complete the MacroOp example
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 23:18:49 +02:00
Elias Naur fa00b53e13 op: change signature of Ops.Write
By returning the allocated data buffer, Ops can become an interface
in a future change without forcing operations to allocate.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 23:10:35 +02:00
Elias Naur 88208891de op/paint,app/internal/gpu: post-process paths during GPU upload
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 22:51:52 +02:00
Elias Naur d9100b506f op,op/paint: remove aux awareness from Ops
Aux data is now entirely confined to the writers (Path) and the
ops Reader parser.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 20:20:56 +02:00
Elias Naur 41eb3807f7 op: assume aux ops are always wrapped by a macro
Shaves off a length, and prepares for further simplification.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 20:02:14 +02:00
Elias Naur 74407a50d5 op/paint: add NewImageOp, unexport ImageOp fields
With public ImageOp fields there was no way to mark an image.Image as modified.
Replace them with NewImageOp that always make a copy, and use the opportunity
to ensure the copy is ready to upload to a GPU texture.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 18:06:50 +02:00
Elias Naur ef5cf5b724 op/paint: return ClipOp from Path.End
Instead of adding an implicit ClipOp, return a ClipOp ready to use, freeing the
caller from recording a macro.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-12 14:01:46 +02:00
Elias Naur 31e12607d7 op/paint: note that ImageOp caches image contents
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-03 19:26:37 +02:00
Elias Naur 6dad034b22 op/paint: rename PathBuilder to Path
There was no "Path" to "Build", so let's just use the simpler name.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-03 13:35:38 +02:00
Elias Naur 3784ece6dd all: rename package ui to unit
Package ui is now only about units except for the Config.Now method.
Remove Now and rename Config to Converter. Add layout.Config to
replace the old ui.Config.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 16:55:47 +02:00
Elias Naur beaec661d2 op/paint: move paint package below the op package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 16:55:47 +02:00
Elias Naur 8cf35a1f97 op: add package op for operations
Extract operation types from package ui into package op.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 16:55:47 +02:00