Hi Denis,

what do you think about being this part of the rendering, but not of the
storage of the lines?

in other words, we store the lines with variable width (as we do today) but
we render them (optionally) with the trapezoid shapes?

about performance, it might be that we are rendering lines segments with
rounded ends. So in theory, this could mean that we are doing
1 line and two half circles per each line-sgement, But i don't know if that
is the case.

--dmg

On Sat, Sep 3, 2016 at 5:15 PM, Denis Auroux <aur...@math.berkeley.edu>
wrote:

> Hi Daniel,
>
> From what I understand, the line rendering change in Immi's patch
> primarily concerns variable-width strokes (pressure-sensitive).  Xournal
> renders them as a sequence of line segments connecting successive points
> along the stroke, with rounded ends, each segment of constant width as
> dictated by the pen pressure at one of its endpoints (can't remember which,
> I don't expect it matters). Instead, Immi's version connects successive
> points by trapezoids (usually long and thin) that you should think of as a
> line segment whose thickness varies linearly from the start point to the
> end point (so the width at each end is dictated by the pressure recorded at
> that point). And to restore the roundedness / avoid unpleasant gaps between
> the trapezoids at the bend points, Immi adds a filled circle at each vertex.
>
> So: you should be able to see the difference clearly by drawing some
> pressure sensitive strokes and zooming in quite a lot.
>
> Optimization: I believe it's a matter of not requesting a new different
> line width for each line segment, instead grouping together consecutive
> segments that have very similar widths and drawing them in one go -- but I
> am not sure if I got it right.
>
> (I am surprised that overall this speeds up rendering, I would have
> expected trapezoids + circles to be slower than line segments but I guess I
> must be wrong. [or perhaps it depends on the graphics drivers and available
> acceleration?]. I don't know how to profile this, but a naive test might be
> to make a document with TONS of variable-width strokes and find out how
> long it takes to render.]
>
> Best,
> Denis
>
>
> ok, before you move forward. Today I have been reviewing a PDF using
>> your branch. So far, it seems ok. But I am not exactly sure what the
>> difference is. Note that I am simply annotating, so I am not writing a
>> lot.
>>
>> I think what we need is two example PDFs (one with and one without) the
>> patch where you demonstrate us what your code is doing.
>>
>> So let us talk first about the change of the line endings. Let us ignore
>> the optimization for a bit.
>>
>
> --
> Denis Auroux
> UC Berkeley, Department of Mathematics
> 817 Evans Hall, Berkeley CA 94720-3840, USA
> aur...@math.berkeley.edu
>



-- 
--dmg

---
Daniel M. German
http://turingmachine.org
------------------------------------------------------------------------------
_______________________________________________
Xournal-devel mailing list
Xournal-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xournal-devel

Reply via email to