是否有解决方法可以从 SVGFileDC 中获取 GraphicsContext
我正在使用 wxWidgets 编写一些科学数据的小型查看器。只要是图形,最好使用 GraphicsContext,它使用浮动坐标,而不是整数。另外,最好保存同一张图片,而不仅仅是绘制它。当在DC(例如PaintDC)上绘图时,我可能只需在新版本的wxWidgets中将其替换为SVGFileDC并获取文件。
有没有办法用 GraphicsContext 做类似的事情?似乎(根据 文档)没有简单的方法可以从中获取 GraphicsContext SVGFileDC.SVG 文件
I am writing a small viewer of some scientific data using wxWidgets. As long as it is a graph, it is preferrable to use GraphicsContext which uses floating coordinates, not integer. Also, it would be nice to save the same picture, not only draw it. When drawing at DC (e.g. PaintDC) I may just replace it with SVGFileDC in the new version of wxWidgets and get the file.
Is there some way to do similar trick with GraphicsContext? It seems that (according to documentation) there is no easy way to get GraphicsContext from SVGFileDC.
我无法直接回答你的问题。然而,在我看来,你的工作水平太低了,可能是在“重新发明轮子”。我希望您能够通过使用可用的、经过测试和调试的绘图包来获得您需要的所有功能,以及您尚未想到的更多功能。
我已经在几个项目中使用了 wxMathPlot - 它非常好
I cannot answer your question directly. However, it seems to me that you are working at too low a level and are probably 're-inventing the wheel'. I expect you would obtain all the features you need, plus many more you have not yet thought of by using an available, tested and debugged plotting package.
I have used wxMathPlot on several projects - it is excellent