On 4 March 2013 23:41, Kolja Lubitz <pinguin...@gmail.com> wrote:
> Hi

Hi Kolja,

> I'm thinking for a while about adding some kind of vector support to
> MaPaint. The main idea is a Paint program in which you don't have to care
> about pixel.
>
> The main workflow should be open the program and you start with a white
> surface and then you can start painting and only in the end if you press
> save you decide in witch resolution you like to have your pic.
>
> On the technical side it is very simple. While painting we need to store all
> input data and scale and brush. And on save the brushes will be rendering to
> a png or so.

I agree with your vision, users should not have to care about pixels
most of the time.

MyPaint already stores most of the input data. Check out the classes
with names like Stroke in lib/stroke.py etc.
At the moment it is used for the "change last stroke" feature that one
can toggle on/off in the brush settings editor,
and probably for the bezier curve lines. Previously it was used for
undo/redo as well, but that was found to be too slow.

That is probably going to be the main challenge: performance. In the
traditional raster model, where one destructively update a set of
tiled mipmapped raster surfaces as changes are made, rendering the
document to screen or to a bitmap export is very fast as it only
requires compositing the layers together (at the appropriate mipmap
level) and blitting it to the screen/bitmap. I am not sure how to
efficiently represent a document of MyPaint brush strokes as vector
data that can be rendered as fast.

To try out the idea, and as a first useful step, you could try to
implement a "lossless resize document" feature? Use the existing
stroke infrastructure to store all input information (probably needs
some additions as well),  and when invoking this function the user can
choose to make the document say 2x bigger or smaller. MyPaint should
then replay all the strokes onto different size surfaces, and the
result should be as if one had been painting at that resolution all
the time.
That should give you a feeling for how feasible it would be
performance wise, and let you understand how such things can be done
inside the MyPaint code.

-- 
Jon Nordby - www.jonnor.com

_______________________________________________
Mypaint-discuss mailing list
Mypaint-discuss@gna.org
https://mail.gna.org/listinfo/mypaint-discuss

Reply via email to