-
Notifications
You must be signed in to change notification settings - Fork 5
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
plugin_dc - Unable to draw rotated text #15
Comments
hm... I'm on very,very thin ice here. Please bear with me. As I understand it you should be able to construct and use a local wxPaintDC object which supports DrawRotadedText. This is about handling EVT_PAINT. There is some example code in o-charts_pi. If you look into src/o-charts_pi-cpp there is first an event binding:
and the OnPaint definition:
Using something like this could perhaps work? (I would certainly use |
This does not work for OpenGL. OpenCPN#15 refers
hm... A bit hard to read your diff. Next time, please first run clang-format and commit those changes before going forward with actual changes. Mixing formatting and "real" changes in a single commit makes for hard to read patches. I'm very, very unsure about the things in plugin_dc, and we might need to involve Dave before final conclusions. That said, my example above was not an idea how to add That is, IIUC we cannot really do this within the overall dc context since that would mean overriding Which then would boil down to that this is application code rather than things added to opencpn-libs. EDIT: typos |
Created a new branch https://github.com/leamas/opencpn-libs/commits/mike/main/ which is the result of splitting your single commit into two, one for formatting and one for the "real" changes". The net result is the same as here, but far easier to read. Please use this instead if we should continue to work with these changes, but see above |
BTW: Looking at leamas/opencpn-libs@c4d922acbd2:
This will definitely not fly. It means referencing GLint, glGetIntegerv, GLMinSymbolLineWidth etc. even if ocpnUSE_GL is not defined. A sure compilation error. Why are these changes done? |
@nohal Thoughts please when time allows. |
Closed my PR for the Windows fix. Now using a duplicate of plugin_dc in a private libs folder. It would be good to get this working for openGL. |
dc.h has DrawRotatedText ... but this is not available from plugin_dc.
Rotated text is needed for a Finnish SAR project under review. The text is applied to route direction arrows:
The text was updated successfully, but these errors were encountered: