1,295
edits
(→API) |
(→API) |
||
Line 18: | Line 18: | ||
Some state is not reset but assumed to be constant between operations: OPERATOR_OVER, default antialiasing mode, etc. | Some state is not reset but assumed to be constant between operations: OPERATOR_OVER, default antialiasing mode, etc. | ||
We can do without pushgroup and make do with temporary surfaces quite easily. | We can do without pushgroup and make do with temporary surfaces quite easily. I don't think we need device offsets. | ||
The context/surface distinction can be simplified. We do need some abstraction for source images that encompasses in-memory buffers, native objects, and temporary surfaces. But we don't draw into a surface with multiple contexts at the same time. We can get by with context creation functions that create a context for specific targets --- an in-memory buffer, a native target, or a PDF stream --- just like cairo surface creation does today. We also need an API to create a "similar surface" of a given size and content-type; this would create a context and a source image object together. | |||
We don't really care about API convenience in Gecko. Unlike a regular application, we don't draw specific content, we just provide abstractions. So for example we only paint gradients in a couple of places, we only paint text in a few places, etc. Therefore we don't need to worry about passing lots of parameters to functions. | We don't really care about API convenience in Gecko. Unlike a regular application, we don't draw specific content, we just provide abstractions. So for example we only paint gradients in a couple of places, we only paint text in a few places, etc. Therefore we don't need to worry about passing lots of parameters to functions. |
edits