-
Notifications
You must be signed in to change notification settings - Fork 9
Neon‐Verovio Coordinate System Conversion
Neon and Verovio have two different coordinate systems.
The coordinate system of Neon uses facsimile, in which the origin is in the top left corner, whereas the origin of Verovio coordinate system is in the bottom left corner. The conversion of the coordinate systems happens in Verovio.
When Verovio loads the MEI file from Neon, LoadData()
calls SyncFromFacsimileFunctor
to convert facsimile>surface>zone@ulx/uly/lrx/lry
to DrawingX/Y
later used in drawing methods to render glyphs. When exporting MEI files, GetMEI()
in Verovio calls SyncToFacsimileFunctor
to sync DrawingX/Y
value to facsimile > surface > zone
in MEI file.
In editortoolkit_neume.cpp
, if you need to do conversions for coordinate calculations, you can use ToLogicalX/Y()
to convert facsimile
value to DrawingX/Y
value and ToDeviceContextX/Y()
to convert DrawingX/Y
value to facsimile
value. If you need to modify zone@ulx/uly/lrx/lry
, you can call m_doc->SyncFromFacsimileDoc()
at the end of the editor action method.
© 2018-2020 Distributed Digital Archives and Libraries Lab