Jojo-Schmitz / MuseScore

MuseScore is a open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
http://musescore.org
Other
39 stars 5 forks source link

Hooks should be drawn as square cap #190

Closed worldwideweary closed 1 year ago

worldwideweary commented 1 year ago

Issue type

Engraving bug

Bug description

And not flat cap. It's possible simply changing

pen.setCapStyle(Qt::FlatCap);

to

pen.setCapStyle(Qt::SquareCap); 

will do the trick for when drawing hooks

@ libmscore/textlinebase.cpp @line 117 on 3.x branch at the moment.

image

Think it was a left over change from transitioning when right before switching to polyline for hairpins because it used to overlap way too much and look like hexagons

Steps to reproduce

.

Screenshots/Screen recordings

No response

MuseScore Version

3.x

Regression

Yes, this used to work in MuseScore 3.x and now is broken

Operating system

.

Additional context

No response

worldwideweary commented 1 year ago

P.S. hope all is well over there

Jojo-Schmitz commented 1 year ago

All fine, thanks hope all is well for you too.

square caps might look better for 90° hooks, but not for 45° ones (which too look bad with flat caps): flat caps: image square caps: image round caps: image Or draw them as polylines, just like for hairpins?

Jojo-Schmitz commented 1 year ago

See #191 Uses round caps for all solid lines that have a 45° hook somewhere

Jojo-Schmitz commented 1 year ago

@worldwideweary , comments?

worldwideweary commented 1 year ago

It seems that polylines are the way to go for all this stuff. I've got it working for my local build, but it's tangled up with other foundational changes so I can't send a pull request at the moment.

My suggestion though is that everything be polylines with square caps and miter joining for the most part. I then have pedal lines specially use round caps for joining 45 degrees without the polylines. The problem is that lines that interconnect (pedals with 45 degree hooks) can't be polylines so easily, since each segment has its own draw command. I was thinking as a work-around to make a static variable that joined them to a container between draw calls. I think it would work, but it's kind of hacky + you'd have to check the segment map in order to verify same tick correlations between 45 degree hooks..., so round caps in the mean-time as a special-case for pedal lines seems appropriate to me.

The joints look way nicer (polylines): image

And the pedal 45ers look pretty decent: image

It's easy enough to let the main pedal-lines be polylines themselves so that they still get miter joining between main body and hooks, just not the joining of hook to hook.

worldwideweary commented 1 year ago

P.S. How do you get that amber color highlight of @ user name? It looks nice

Jojo-Schmitz commented 1 year ago

What amber color? Looks black and bold to me

worldwideweary commented 1 year ago

image

Tis what it looks like over here. Maybe it's a theme thing...

Jojo-Schmitz commented 1 year ago

Ah, dark mode, it seems

Jojo-Schmitz commented 1 year ago

Those polyline pedal lines should be done in Mu4 too/first

Jojo-Schmitz commented 1 year ago

If and once done in Mu4, I'll backport polylines ;-)

The squarce ap change is donw via #191