Menu

#34 Incorrect Page Bounding Box Calculation

v1.0_(example)
pending
None
1
2017-03-06
2017-02-10
Arshia Cont
No

The Page Bounding Box does not take into account the following tags (and possibly more):
\tempo tag
\intes tags
dynamic tags such as \cresc and \dim
\text tags

As a result these elements are ignored and the bounding box is incorrect.

Check the following score as an example in GuidoEditor, enable the Page Bounding Box in preferences and see its overlap with the \tempo tag as an example.

1 Attachments

Discussion

  • Arshia Cont

    Arshia Cont - 2017-02-10

    Once you get here, here's another very strange behavior regarding Page Bounding Box. It seems like \intens tag significantly increases Page Bounding Box if they are on the last note of a measure, and not on other notes!

    Observe the bounding boxes on these two scores:

    Strange one:

    { [ \staff<1> \instr<"Violin", dx=-12hs, dy=-5hs> \systemFormat<"", dx=12hs> \barFormat<style= "system", range="1"> 
       (* meas. 1 *)  \clef<"c4"> \key<2> \meter<"4/4", autoBarlines="off", autoMeasuresNum="page"> \tempo<"[1/4] = 80"> _/1 \bar 
       (* meas. 10 *)  \beamsOff \intens<"p", dy=-2hs> e/2    \beamsOff f  \bar 
        g  \intens<"f", dy=-2hs> d
      ]
     }
    

    Regular one despite the fact that Intensities are ignored (and should be included):

    { [ \staff<1> \instr<"Violin", dx=-12hs, dy=-5hs> \systemFormat<"", dx=12hs> \barFormat<style= "system", range="1"> 
       (* meas. 1 *)  \clef<"c4"> \key<2> \meter<"4/4", autoBarlines="off", autoMeasuresNum="page"> \tempo<"[1/4] = 80"> _/1 \bar 
       (* meas. 10 *)  \beamsOff \intens<"p", dy=-2hs> e/2    \beamsOff f  \bar 
        \intens<"f", dy=-2hs> g   d
      ]
     }
    

    You can use this last one as unit test! :)

     
  • Dominique Fober

    Dominique Fober - 2017-02-21
    • status: open --> pending
    • assigned_to: Dominique Fober
     
  • Dominique Fober

    Dominique Fober - 2017-02-21

    The page bounding box is used by the line breaking algorithm, that's why it encloses only the notes. You should include the page margins to get the whole page content. Is it a solution in your case?

     
  • Arshia Cont

    Arshia Cont - 2017-03-05

    By increasing the page margin the problem is partially solved but not entirely. In our case, each page includes only one system and we tighten them so that several pages would fit into one screen.

    If I increase the margin, then there'd be too much distance between systems but so far we have found a compromise.

    Note that this is only because we do a ResizePageToMusic that re-evalutes the Height of the page which apparently does not take into account \text tags and also \intense tags and wedges.

    I'll see how we can overcome this but if there was a way to take into account those tags it would be wonderful OR if there's a different approach we'd definitely go for it.

     
  • Dominique Fober

    Dominique Fober - 2017-03-06

    The strange thing is that with the GuidoEditor (which I'm always using with ResizePageToMusic set to on) I don't get this problem. There must be another reason. Do you draw directly to screen or do you have an offscreen + copy to screen ?

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.