简体   繁体   English

在Linux上以C ++显示2D图像的简单库

[英]Simple library to display 2D images in C++ on Linux

I would like to have a tool to debug 2D planar meshes. 我想拥有一个调试2D平面网格的工具。 I would like to be able to display them and debug to be able to debug certain things. 我希望能够显示它们并进行调试,以便能够调试某些东西。

Is there a widget (for any toolkit on Linux - QT, GTK+Cairo, ...) which would display the images, scroll them and zoom it. 是否有一个小部件(对于Linux上的任何工具包-QT,GTK + Cairo等),将显示图像,滚动并缩放图像。 Is there any widget which would handle it (without need to implement zooming, scrolling etc. by hand)? 是否有任何可处理它的小部件(无需手动实现缩放,滚动等)?

Side requirements: 侧面要求:

  • Needs to work on CentOS 6 需要在CentOS 6上工作
  • I need it for C++. 我需要C ++。 Unfortunately changing the build system in my situation is harder then it sounds. 不幸的是,在我看来,更改构建系统要困难得多。

The Qt Graphics View is certainly a useful tool, it gives you scrolling, zooming, rotating easily. Qt图形视图当然是有用的工具,它使您可以轻松滚动,缩放和旋转。 You probably want to learn the basics of Qt before. 您可能想先学习Qt的基础知识。 (and Qt is in C++). (并且Qt在C ++中)。

Here's an off the wall suggestion. 这是一个绝妙的建议。

This would be fairly easy to implement in a web browser. 这在Web浏览器中很容易实现。 Web browser engines already have the base functionality for resizing and scrolling over images. Web浏览器引擎已经具有用于调整图像大小和滚动图像的基本功能。 You may need a little JavaScript to bind it together, of course. 当然,您可能需要一些JavaScript才能将其绑定在一起。

So why not use WebKit ? 那么为什么不使用WebKit呢? There are bindings for many of the leading toolkits (eg QWebView for Qt), so you could take your pick of which one you're most comfortable with. 许多领先的工具包都有绑定(例如QWebView for Qt),因此您可以选择最喜欢的一个。

Yes, it's overkill. 是的,这太过分了。 But it's code you don't have to write, and time is money. 但这是您不必编写的代码,时间就是金钱。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM