I was looking at your code. I think it would be very useful to separate conceptually the two changes, as you said before. It will also be very useful to us that you describe (ideally in the log of the commit) a bit in detail the changes. E.g. Motivation, how you did it, impact on xournal (changes in file format, for example).So let us split the changes into conceptual changes: one for the line widths, and the other for the optimization.
It turns out that splitting things would be some work, so I'd like to know what you exactly would think would be useful to have:
(1) I can easily provide an old version I have somewhere where I only made the line width changes, but not the optimization. However, there are also various things related to line width I only fixed after implementing the optimization.
(2) With not too much additional work, I can also apply the above-mentioned fixes to the line width version.
(3) If you'd want a version which is only optimized but no line widths changes, I'd have to essentially rewrite that. So that would be a bit more work (though I'd do it if deemed useful).
(4) The line widths changes themselves could be split into two parts: (a) Drawing trapezes instead of rectangular line segments (b) Dealing properly with the beginning of paths.Only (b) affects the file format, and (b) is rather easy to undo. So I could rather easily create a version with optimization and with (a), but without (b).
What do you think would be useful?Apart from that, I have some further ideas for optimization of the version with improved line widths. (I'll have to test whether they really improve things.) But I think I should first sort out the other stuff above.
Also, regarding backwards compatibility. Older versions of xournal can parse new files, as long as the features are new elements in the XML, but not if there are new attributes.
In second thoughts, I think it would be good to use the pull requests, even if we don't actually merge them directly using github, but it will let us do code review of the changes, and ask for specific clarifications. For example, in the case of your code, I am curious to know what the purpose of the functions are: void make_canvas_stroke_disc(struct Item *item, double * pt, double * w) void make_canvas_stroke_trapeze(struct Item *item, double * pt, double * w)
Let me already answer this question. The new way to draw a path consists in drawing one trapeze for each segment and one disc in between any two segments (see attached picture). The above two functions draw these two things.
Best, Immi
Regarding Denis suggestion, let us keep compatibility with every Xournal version to the max, while we try to innovate. And let us keep every few feature in its own branch, while we still try to have keep the "next" version with these features. thanks Immi, Denis, --daniel -- Daniel M. German "One reason that life is complex is that it has a real part and Andrew Koenig -> an imaginary part." http://turingmachine.org/ http://silvernegative.com/ dmg (at) uvic (dot) ca replace (at) with @ and (dot) with .
disc-trapeze.xoj
Description: application/xoj
------------------------------------------------------------------------------
_______________________________________________ Xournal-devel mailing list Xournal-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xournal-devel