Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-25 Thread Gerhard Mesenich
Hi Denis, > Thanks for all the very good suggestions for how to make xournal > competent at precision technical drawing. As you have probably noticed, > the initial focus was very much on quickly jotting handwritten notes, > i.e. the model is NOT drafting machines but rather something much > s

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread dmg
On Mon, Mar 24, 2014 at 8:46 PM, D M German wrote: > > So what I am advocating for is: > > 1. A flag to the stroke that indicates if it is to be filled. > 2. If the flag is TRUE, and the first and last strokes in the same >location, then fill it. otherwise do not. > 3. Store the flag in the XO

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread D M German
Denis Auroux twisted the bytes to say: Denis> After checking: indeed, GnomeCanvasPolygon implements filled polygons Denis> and uses the same GnomeCanvasPoints structure as GnomeCanvasLine for Denis> storing the coordinates of the successive points. So, by far the Denis> easiest way to extend

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread dmg
On Mon, Mar 24, 2014 at 7:57 PM, dmg wrote: > If I remember correctly even non-closed polygons can be filled, but I > have to check. > > I think that a simple "fill" flag is all that is needed to make it work. I was wrong. In gnomecanvas only closed paths can be filled. but one alternative is t

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread dmg
On Mon, Mar 24, 2014 at 7:53 PM, wrote: >> I view triangles as less urgent, in part because they can't be drawn >> intuitively in a single gesture (unlike rectangles where you can just >> drag from one corner to the opposite corner, and circles where either >> corners or center + radius are reaso

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread Denis Auroux
Hi Daniel, The reason we store lots of points even on rectangles or straight lines is for the eraser -- the eraser only works if the strokes are subdivided into short enough segments so the eraser actually catches one of the points (i.e. the eraser erases vertices, not segments). See subdivide

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread dmg
I just checked how rectangles and circles are stored. It looks like at least rectangles can be simplified. They contain every single sampled point (adjusted to be a rectangle). My suggestion is to add an attribute to the strokes element in XML called filled. If present it is filled, and if absent

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread romanocomp
On 2014-03-24 21:36, Denis Auroux wrote: > >> I have a *really* hard time to trigger shape recognition with my wacom >> tablet. I advocate for a normal "add triangle, rectangle, circle" >> shape. > > Rectangles and circles are certainly worth doing -- the ruler should > be expanded into a larger

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread Denis Auroux
After checking: indeed, GnomeCanvasPolygon implements filled polygons and uses the same GnomeCanvasPoints structure as GnomeCanvasLine for storing the coordinates of the successive points. So, by far the easiest way to extend things is to have stroke elements carry a filled-in flag to determine

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread Denis Auroux
Hi all, >> I want the same feature too. Denis, what do you think is the best way >> to implement this? Just add an "fill-in" flag and >> fill any polygon created (including non-rectangles/circles)? or be >> more specific and only fill rectangles and circles? Actually, in the xoj file format, if y

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread Edward Z . Yang
There are basically two options. One is for each shape to have its own representation (this is what I implemented for boxes). Then you might also have an operation "convert to path" (as in Inkscape) which converts it into the general polygonal representation. The other is to just always use the p

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread dmg
hi Edward, Denis, how should boxes/circles be recorded in the .xoj file? --dmg On Mon, Mar 24, 2014 at 5:40 PM, Edward Z. Yang wrote: > I implemented box fill on my fork of Xournal: > https://github.com/ezyang/xournal/commits/master > It's a bit of a hack, but boxes are easy to draw and I wante

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread romanocomp
On 2014-03-24 19:21, dmg wrote: > On Mon, Mar 24, 2014 at 4:54 PM, wrote: >> On 2014-03-23 15:51, Denis Auroux wrote: >> I basically agree with Denis. One thing that I miss a lot, anyway, is >> the ability to create *filled* rectangles and circles... or it's me >> that >> can't make my mind aro

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread Edward Z . Yang
I implemented box fill on my fork of Xournal: https://github.com/ezyang/xournal/commits/master It's a bit of a hack, but boxes are easy to draw and I wanted something immediately. A marginal improvement would be arbitrary polygons. However... You can't just "add fill-in" to rectangles and circles

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread dmg
On Mon, Mar 24, 2014 at 4:54 PM, wrote: > On 2014-03-23 15:51, Denis Auroux wrote: >> Hi Gerhard, >> >> Thanks for all the very good suggestions for how to make xournal >> competent at precision technical drawing. As you have probably noticed, >> the initial focus was very much on quickly jotting

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-24 Thread romanocomp
On 2014-03-23 15:51, Denis Auroux wrote: > Hi Gerhard, > > Thanks for all the very good suggestions for how to make xournal > competent at precision technical drawing. As you have probably noticed, > the initial focus was very much on quickly jotting handwritten notes, > i.e. the model is NOT draf

Re: [Xournal-devel] fixed aspect and other snappy features

2014-03-23 Thread Denis Auroux
Hi Gerhard, Thanks for all the very good suggestions for how to make xournal competent at precision technical drawing. As you have probably noticed, the initial focus was very much on quickly jotting handwritten notes, i.e. the model is NOT drafting machines but rather something much simpler:

Re: [Xournal-devel] fixed aspect and other snappy features (was: low-hanging fruit for 0.4.8 release?)

2014-03-21 Thread romanocomp
Quoting Denis Auroux : > On 03/21/2014 03:25 PM, Andreas K. Huettel wrote: >> How about fixed aspect ratio resize? Very useful for images... > > Perhaps. What is the proposed UI mechanism? My suggestion would be to make the corners doing fixed ratio resize, and forcing to drag the borders for a

Re: [Xournal-devel] fixed aspect and other snappy features (was: low-hanging fruit for 0.4.8 release?)

2014-03-21 Thread Denis Auroux
On 03/21/2014 03:25 PM, Andreas K. Huettel wrote: > How about fixed aspect ratio resize? Very useful for images... Perhaps. What is the proposed UI mechanism? I don't like the idea of having to press a special key (it's not intuitive, and doesn't work well on tablets); the logical thing is prob