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

时间:2022-09-02 00:22:52

I would like to have a tool to debug 2D planar meshes. I would like to be able to display them and debug to be able to debug certain things.

我想有一个工具来调试2D平面网格。我希望能够显示它们并进行调试以便能够调试某些事情。

Is there a widget (for any toolkit on Linux - QT, GTK+Cairo, ...) which would display the images, scroll them and zoom it. Is there any widget which would handle it (without need to implement zooming, scrolling etc. by hand)?

是否有一个小部件(适用于Linux上的任何工具包 - QT,GTK + Cairo,......)可以显示图像,滚动它们并进行缩放。是否有任何小部件可以处理它(不需要手动实现缩放,滚动等)?

Side requirements:

  • Needs to work on CentOS 6
  • 需要在CentOS 6上工作

  • I need it for C++. Unfortunately changing the build system in my situation is harder then it sounds.
  • 我需要它用于C ++。不幸的是,在我的情况下更改构建系统比听起来更难。

2 个解决方案

#1


1  

The Qt Graphics View is certainly a useful tool, it gives you scrolling, zooming, rotating easily. You probably want to learn the basics of Qt before. (and Qt is in C++).

Qt图形视图当然是一个有用的工具,它可以让您轻松滚动,缩放和旋转。您可能想要了解Qt的基础知识。 (和Qt是C ++)。

#2


0  

Here's an off the wall suggestion.

这是一个关于墙的建议。

This would be fairly easy to implement in a web browser. Web browser engines already have the base functionality for resizing and scrolling over images. You may need a little JavaScript to bind it together, of course.

这在Web浏览器中相当容易实现。 Web浏览器引擎已具有用于调整图像大小和滚动图像的基本功能。当然,您可能需要一些JavaScript来将它绑定在一起。

So why not use WebKit? There are bindings for many of the leading toolkits (e.g. QWebView for Qt), so you could take your pick of which one you're most comfortable with.

那么为什么不使用WebKit呢?许多领先的工具包都有绑定(例如Qt的QWebView),因此您可以选择最适合自己的工具包。

Yes, it's overkill. But it's code you don't have to write, and time is money.

是的,这太过分了。但这是你不必写的代码,时间就是金钱。

#1


1  

The Qt Graphics View is certainly a useful tool, it gives you scrolling, zooming, rotating easily. You probably want to learn the basics of Qt before. (and Qt is in C++).

Qt图形视图当然是一个有用的工具,它可以让您轻松滚动,缩放和旋转。您可能想要了解Qt的基础知识。 (和Qt是C ++)。

#2


0  

Here's an off the wall suggestion.

这是一个关于墙的建议。

This would be fairly easy to implement in a web browser. Web browser engines already have the base functionality for resizing and scrolling over images. You may need a little JavaScript to bind it together, of course.

这在Web浏览器中相当容易实现。 Web浏览器引擎已具有用于调整图像大小和滚动图像的基本功能。当然,您可能需要一些JavaScript来将它绑定在一起。

So why not use WebKit? There are bindings for many of the leading toolkits (e.g. QWebView for Qt), so you could take your pick of which one you're most comfortable with.

那么为什么不使用WebKit呢?许多领先的工具包都有绑定(例如Qt的QWebView),因此您可以选择最适合自己的工具包。

Yes, it's overkill. But it's code you don't have to write, and time is money.

是的,这太过分了。但这是你不必写的代码,时间就是金钱。