Inconsistency with Staves y coordinates #2619
-
|
Hi ! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
TBH, the samples are slightly outdated. The chunks you receive in partialRenderFinished are absolutely positioned and you also get an x/y coordinate where to position them. Here is a more up-to-date example (from the Node.js PNG rendering guide). but the positioning part applies to SVGs too. But in the end it depends on what you are exactly doing. Maybe you can prepare a small fiddle showing your problem. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you very much, the example provided makes everything clearer. The issue came from alphatab default padding (alphatabSettings.display.padding) but using renderResult.x and renderResult.y allow to take the padding into account smoothly. |
Beta Was this translation helpful? Give feedback.
TBH, the samples are slightly outdated. The chunks you receive in partialRenderFinished are absolutely positioned and you also get an x/y coordinate where to position them.
Here is a more up-to-date example (from the Node.js PNG rendering guide). but the positioning part applies to SVGs too.
https://alphatab.net/docs/guides/nodejs#combine-all-individual-pngs-into-one-final-one-and-save-it
But in the end it depends on what you are exactly doing. Maybe you can prepare a small fiddle showing your problem.