Re: Transformation experiments

2006-05-12 Thread Erlend Aasland
On 5/12/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: > Ok. New version attached. I've thrown in something for the SVG-backend> too, but that part is a bit buggy (I'll have to take a closer look at> the SVG spec next week). The C++ stuff and PS-backend should look good now. OK. If please commit w

Re: Transformation experiments

2006-05-12 Thread Han-Wen Nienhuys
Erlend Aasland schreef: Hi Han-Wen On 5/8/06, *Han-Wen Nienhuys* <[EMAIL PROTECTED] > wrote: Erlend Aasland wrote: > There are no bugs with the current code, so why rewrite it? Because it's not _obviously_ correct. Ok. New version attached. I've thrown

Re: Transformation experiments

2006-05-12 Thread Erlend Aasland
Hi Han-WenOn 5/8/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: Erlend Aasland wrote:> There are no bugs with the current code, so why rewrite it?Because it's not _obviously_ correct.Ok. New version attached. I've thrown in something for the SVG-backend too, but that part is a bit buggy (I'll have

Re: Transformation experiments

2006-05-08 Thread Han-Wen Nienhuys
Erlend Aasland wrote: There are no bugs with the current code, so why rewrite it? Because it's not _obviously_ correct. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen LilyPond Software Design -- Code for Music Notation http://www.lilypond-design.com

Re: Transformation experiments

2006-05-08 Thread Erlend Aasland
On 5/8/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: ok, nits that need to be addressed before integrating:  - stencil::rotate should take Offset() as argument.Done   - I think widen() can also shrink the bbox, can you double check thatyour scaling routine doesn't shrink the bbox?  (x_new - x_le

Re: Transformation experiments

2006-05-08 Thread Han-Wen Nienhuys
Erlend Aasland wrote: On 5/5/06, *Han-Wen Nienhuys* <[EMAIL PROTECTED] > wrote: > ... the problem is more about what variables to modify. It > appears to me like dim_ contains the bounding box, but when I modify it, > the rotated stencils are misplac

Re: Transformation experiments

2006-05-08 Thread Erlend Aasland
On 5/5/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: > ... the problem is more about what variables to modify. It> appears to me like dim_ contains the bounding box, but when I modify it,> the rotated stencils are misplaced.strange. are you sure you're not seeing artefacts of the fact that placem

Re: Transformation experiments

2006-05-05 Thread Han-Wen Nienhuys
Erlend Aasland wrote: I agree. But the problem is more about what variables to modify. It appears to me like dim_ contains the bounding box, but when I modify it, the rotated stencils are misplaced. strange. are you sure you're not seeing artefacts of the fact that placements algorithms look

Re: Transformation experiments

2006-05-05 Thread Erlend Aasland
On 5/5/06, Johannes Schindelin <[EMAIL PROTECTED]> wrote: On Fri, 5 May 2006, Erlend Aasland wrote:> I agree. But the problem is more about what variables to modify. It appears> to me like dim_ contains the bounding box, but when I modify it, the> rotated stencils are misplaced. Ah. I understand. Y

Re: Transformation experiments

2006-05-05 Thread Johannes Schindelin
Hi, On Fri, 5 May 2006, Erlend Aasland wrote: > I agree. But the problem is more about what variables to modify. It appears > to me like dim_ contains the bounding box, but when I modify it, the > rotated stencils are misplaced. Ah. I understand. You probably have to adjust the offsets, too? C

Re: Transformation experiments

2006-05-05 Thread Erlend Aasland
Hi JohannesOn 5/5/06, Johannes Schindelin <[EMAIL PROTECTED]> wrote: I don't know about dim_, but the easiest way to find the new bounding boxis to rotate all four edges of the original bounding box, and take theminima and maxima of the results as new bounds.Of course, you could try to be clever an

Re: Transformation experiments

2006-05-05 Thread Johannes Schindelin
Hi, On Fri, 5 May 2006, Erlend Aasland wrote: > But, I'm having some problems with adjusting the bounding box. Should it not > be sufficient to modify dim_ in the stencil? I don't know about dim_, but the easiest way to find the new bounding box is to rotate all four edges of the original bound

Re: Transformation experiments

2006-05-05 Thread Erlend Aasland
Hi Han-WenI've had very little time to do coding the past two days, so I've only managed to do a little bit more on this rotation thing.Rotation is now specified as #'(degrees x y) where x and y are relative to the extent of the grob ( i.e. (0,0) is center and (1,1) is upper right corner...). This

Re: Transformation experiments

2006-05-04 Thread Erlend Aasland
On 5/4/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: I think it's better to explicitly ask for everything, ie.   #'rotation = #'(45 0 -1)(where the last 2 numbers are 1,-1 style.)I agree. I'll modify the patch.Erlend ___ lilypond-devel mailing list lil

Re: Transformation experiments

2006-05-04 Thread Han-Wen Nienhuys
Erlend Aasland schreef: On 5/3/06, *Erlend Aasland* <[EMAIL PROTECTED] > wrote: Currently the implementation rotates a stencil around it's center, but this isn't alway desired (I think). It would perhaps make more sense to rotate hairpins around the origin

Re: Transformation experiments

2006-05-04 Thread Erlend Aasland
On 5/3/06, Erlend Aasland <[EMAIL PROTECTED]> wrote: Currently the implementation rotates a stencil around it's center, but this isn't alway desired (I think). It would perhaps make more sense to rotate hairpins around the origin... I'm thinking of a good way to make this tunable... Hmm... What wou

Re: Transformation experiments

2006-05-04 Thread Mats Bengtsson
Erlend Aasland wrote: On 5/4/06, *David Feuer* <[EMAIL PROTECTED] > wrote: On 5/3/06, Han-Wen Nienhuys <[EMAIL PROTECTED] > wrote: What is the purpose of this transformation mechanism? Well, rotated hairpins and text on glissa

Re: Transformation experiments

2006-05-03 Thread Erlend Aasland
On 5/4/06, David Feuer <[EMAIL PROTECTED]> wrote: On 5/3/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote:> Mats Bengtsson schreef:>> > Following the ideas of other alignments in LilyPond, you could let the > > offset be represented by a tuple (X offset and Y offset), where 0 means> > center, -1 is l

Re: Transformation experiments

2006-05-03 Thread David Feuer
On 5/3/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: Mats Bengtsson schreef: > Following the ideas of other alignments in LilyPond, you could let the > offset be represented by a tuple (X offset and Y offset), where 0 means > center, -1 is left/lower edge, +1 is right/top edge. > Note that the

Re: Transformation experiments

2006-05-03 Thread Han-Wen Nienhuys
Mats Bengtsson schreef: Following the ideas of other alignments in LilyPond, you could let the offset be represented by a tuple (X offset and Y offset), where 0 means center, -1 is left/lower edge, +1 is right/top edge. Note that the values should/could be any real number, not necessarily limi

Re: Transformation experiments

2006-05-03 Thread Mats Bengtsson
Quoting Erlend Aasland <[EMAIL PROTECTED]>: Currently the implementation rotates a stencil around it's center, but this isn't alway desired (I think). It would perhaps make more sense to rotate hairpins around the origin... I'm thinking of a good way to make this tunable... something like this p

Re: Transformation experiments

2006-05-03 Thread Erlend Aasland
Hi Han-WenOn 5/3/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: Interesting idea! We'll need a SVG implementation before I could acceptit; and the bboxes should be correct too.Shure.Currently the implementation rotates a stencil around it's center, but this isn't alway desired (I think). It would

Re: Transformation experiments

2006-05-03 Thread Han-Wen Nienhuys
Interesting idea! We'll need a SVG implementation before I could accept it; and the bboxes should be correct too. Erlend Aasland schreef: ...and another version, now with a generic grob property ('rotation) that let you rotate any grob (for example crescendo hairpins). On 5/3/06, *Erlend Aa

Re: Transformation experiments

2006-05-03 Thread Erlend Aasland
...and another version, now with a generic grob property ('rotation) that let you rotate any grob (for example crescendo hairpins).On 5/3/06, Erlend Aasland <[EMAIL PROTECTED]> wrote: ...just a small improvement: the target stencil is now rotated around its center, not its origin. On 5/3/06, Erlen

Re: Transformation experiments

2006-05-03 Thread Erlend Aasland
...just a small improvement: the target stencil is now rotated around its center, not its origin.On 5/3/06, Erlend Aasland < [EMAIL PROTECTED]> wrote:Hello everyone,I've been experimenting a bit with a rotate command (just for fun and for getting to know the internals of Lilypond better). The resul

Transformation experiments

2006-05-03 Thread Erlend Aasland
Hello everyone,I've been experimenting a bit with a rotate command (just for fun and for getting to know the internals of Lilypond better). The result of the experiment is in the attached patch. Seems to work well enough, but the implementation could probably be better :-) Comments?Regards,  Erlend