Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write liquescent via nc@curve #127

Merged
merged 12 commits into from
Mar 14, 2024
Merged

Write liquescent via nc@curve #127

merged 12 commits into from
Mar 14, 2024

Conversation

yinanazhou
Copy link
Member

Neon issue DDMAL/Neon#1169

ahankinson and others added 6 commits December 22, 2023 09:57
This should fix the scipy security warning by updating the dependencies for the "fonts" scripts.
Integrate lates changes from DDMAL
src/iomei.cpp Show resolved Hide resolved
@yinanazhou
Copy link
Member Author

Updated changes:

  • Add SetLiquescent() to change note head shape
  • Fix writing and reading liquescent, example:
<neume xml:id="m-354f1330-2a4b-45bc-8827-67691bd19d78">
    <nc xml:id="m-a7f25736-be07-49de-8a59-88e2341f5fb3" facs="#m-798034aa-80da-46a5-afe5-6745a0567387" oct="2" pname="d" tilt="n"/>
    <nc xml:id="m-d8b82058-2d30-4679-8b22-658f937a9888" facs="#m-aad0fb4a-8437-4d62-bdf5-523cddec911e" oct="2" pname="c" curve="a">
        <liquescent xml:id="l638nb2"/>
    </nc>
</neume>
  • Fix drawing liquescent

@yinanazhou yinanazhou requested a review from lpugin January 9, 2024 19:28
@@ -274,7 +274,9 @@ void View::DrawNc(DeviceContext *dc, LayerElement *element, Layer *layer, Staff
}

// Draw the children
this->DrawLayerChildren(dc, nc, layer, staff, measure);
if (!nc->FindDescendantByType(LIQUESCENT)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally we always render child elements individually. So if the encoding is:

<nc>
  <liquescent/>
</nc>

We expect the liquescent to be drawn in a call to DrawLayerChildren so the SVG will be

<g class="nc">
  <g class="liquescent"/>
</g>

This is important if you have editorial markup:

<nc>
  <add>
     <liquescent/>
   </add>
</nc>

Which then becomes:

<g class="nc">
  <g class="add">
    <g class="liquescent"/>
  <g/>
</g>

Which allows (for example) to highlight what has been added. This would be missing with your implementation because <liquescent> drawing is happening in nc drawing.

@softcat477 softcat477 removed their request for review January 11, 2024 17:03
@yinanazhou
Copy link
Member Author

I've added DrawLiquescent. Now the SVG for liquescent is like this:

<g id="nd7xrcn" class="neume" style="fill: rgb(221, 0, 0);">
   <g id="nj2ffc8" class="nc" stroke="black" stroke-width="30px">
      <g id="lb68cfw" class="liquescent">
         <use xlink:href="#E9BE-1dxljrq" x="841" y="487" height="223px" width="223px"></use>
         <use xlink:href="#EB98-1dxljrq" x="841" y="500" height="223px" width="223px"></use>
         <use xlink:href="#E994-1dxljrq" x="841" y="500" height="223px" width="223px"></use>
         <use xlink:href="#EB99-1dxljrq" x="841" y="500" height="223px" width="223px"></use>
         <use xlink:href="#E9BE-1dxljrq" x="872" y="480" height="223px" width="223px"></use>
      </g>
   </g>
</g>

@yinanazhou yinanazhou requested a review from lpugin February 12, 2024 22:29
@yinanazhou yinanazhou merged commit 944f191 into develop Mar 14, 2024
8 checks passed
@yinanazhou yinanazhou deleted the write-liq-fix branch March 14, 2024 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants