如何只是访问屏幕? [英] How does one simply acces the screen?

查看:58
本文介绍了如何只是访问屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题非常简单。我想知道我如何访问屏幕以打印不同种类的颜色或图像。

这是一个非常大的问题,我知道但这是我第一次做这样的事情。所以保持基本。 :)

感谢您回答的时间

解决方案

这在很大程度上取决于您运行C ++程序的环境。在老式的DOS程序中,您可以直接访问视频内存。现在几乎就像老式的Win32应用程序具有相当抽象的GDI(图形设备接口),您可以使用它来绘制而无需关心低级硬件问题。如果你想使用现代图形硬件的所有功能,你需要看看DirectX或Open GL。



还有无数的方法可以获得在其他语言和环境中进入屏幕。一旦你知道你想去哪里以及你想在那里做什么,你应该找一些关于这个主题的文章,这可能比你在这里回答问题更有帮助。


这取决于平台。在 Windows 上,您可以使用 GDI (例如参见GDI绘图和打印 [ ^ ]),但有很多替代方法( GDI +,Direct3D,OpenGL ,. ..)。

My question is pretty simple. I want to know how i acces the screen to print different kinds of both colors or images.
This a very big question which i am aware of but this is the first time i would do something like this. So keep it basic. :)
Thanks for the time taken answering

解决方案

That depends very much on the environment in which your C++ program runs. In an oldfashioned DOS program you could access video memory directly. A by now almost just as oldfashioned Win32 application has the rather abstract GDI (graphics device interface) with which you can draw without having to care about low level hardware issues. If you want to use all the features of modern graphics hardware, you will need to take a look at DirectX or Open GL.

And there are countless more ways to get somthing onto the screen in other languages and environments. Once you know where you want to go and what you want to do there, you should look for some articles about the subject which will probably help you more than any answer to a question here.


That is platform dependent. On Windows you may use the GDI (see for instance "GDI Drawing and Printing"[^]), but there are many alternatives to (GDI+, Direct3D, OpenGL,...).


这篇关于如何只是访问屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆