Re: [Xournal-devel] Xournal line drawing algorithm

2014-10-14 Thread Denis Auroux
On 10/14/2014 10:19 PM, D M German wrote: > Denis, is there a way to specify that you don't want compresses xoj > files? Alas not. This should be no big deal, but it'd require a wrapper for fprintf()/gzprintf() to allow writing either in gzipped or uncompressed format. (gzopen() can read uncom

Re: [Xournal-devel] Xournal line drawing algorithm

2014-10-14 Thread D M German
Shuhao twisted the bytes to say: Shuhao> Hey, Shuhao> I'm curious to how the xournal line drawing algorithm works. Is there a Shuhao> document somewhere documenting its process? This algorithm is the best Shuhao> I've seen from a couple of programs and I'm wondering how exactly it's Sh

Re: [Xournal-devel] Xournal line drawing algorithm

2014-10-14 Thread D M German
Shuhao Wu twisted the bytes to say: Shuhao> Another question is how do you enabled efficient erasing? How is the Shuhao> line segments stored so they can be efficiently looked up for erasing? I have the feeling you are writing an application to do pen annotations :) --dmg Shuhao> Thanks,

Re: [Xournal-devel] Xournal line drawing algorithm

2014-10-14 Thread D M German
Denis Auroux twisted the bytes to say: Denis> On 10/01/2014 05:20 PM, Shuhao Wu wrote: >> I'm also impressed by the fact that the anti aliasing looks very good. I >> assume this is handled by gnome Denis> Yes -- by libgnomecanvas specifically (with the help of libart_lgpl Denis> again).

Re: [Xournal-devel] Xournal line drawing algorithm

2014-10-07 Thread Denis Auroux
Dear Shuhao, It's not all that efficient in fact -- but each item (e.g. a pen stroke) has a bounding box (i.e. the smallest rectangle containing it entirely) that xournal keeps track of. So when one uses the eraser, xournal scans through all items on the page (actually just the current layer) a

Re: [Xournal-devel] Xournal line drawing algorithm

2014-10-07 Thread Shuhao Wu
Another question is how do you enabled efficient erasing? How is the line segments stored so they can be efficiently looked up for erasing? Thanks, Shuhao On 10/01/2014 05:00 PM, Denis Auroux wrote: > On 10/01/2014 05:20 PM, Shuhao Wu wrote: >> I'm also impressed by the fact that the anti aliasin

Re: [Xournal-devel] Xournal line drawing algorithm

2014-10-01 Thread Denis Auroux
On 10/01/2014 05:20 PM, Shuhao Wu wrote: > I'm also impressed by the fact that the anti aliasing looks very good. I > assume this is handled by gnome Yes -- by libgnomecanvas specifically (with the help of libart_lgpl again). Xournal doesn't do any antialiasing of its own. Libgnomecanvas has so

Re: [Xournal-devel] Xournal line drawing algorithm

2014-10-01 Thread Shuhao Wu
Ah I was referring to the drawing with a pen process. That's was very helpful. I'm also impressed by the fact that the anti aliasing looks very good. I assume this is handled by gnome and the fact that the line segment is so small? (0.3px?) Furthermore is pressure sensitivity data recorded per li

Re: [Xournal-devel] Xournal line drawing algorithm

2014-09-30 Thread Denis Auroux
I'm not sure what you mean exactly by "line drawing algorithm". Do you mean just the process of drawing with the pen? If so: position data is received from the stylus or other input devices; if there hasn't been enough motion since the last point (by default 0.3 pixel) we discard the information

[Xournal-devel] Xournal line drawing algorithm

2014-09-30 Thread Shuhao
Hey, I'm curious to how the xournal line drawing algorithm works. Is there a document somewhere documenting its process? This algorithm is the best I've seen from a couple of programs and I'm wondering how exactly it's accomplished. Unfortunately my C skills are not as good and somewhat rusty