计算机专业外文资料翻译
《计算机专业外文资料翻译》由会员分享,可在线阅读,更多相关《计算机专业外文资料翻译(9页珍藏版)》请在毕设资料网上搜索。
1、毕业设计 (论文 )外文资料翻译 外文出处 : Advanced MFC Programming 附 件: A.外文翻译 -原文部分 B.外文翻译 -译文部分 指导教师评 语 : 签名: 年 月 日 (用外文写 ) 附录 A.外文 翻译 -原文部分 (写明出处 ) Advanced MFC Programming Chapter 8: DC, Pen, Brush and Palette 8.0 Device Context & GDI Objects Starting from this chapter, we are going to study topics on GDI (Graphi
2、cs Device Interface) programming. Situation GDI is a standard interface between the programmer and physical devices. It provides many functions that can be used to output various objects to the hardware (e.g. a display or a printer). GDI is very important because, as a programmer, we may want our ap
3、plications to be compatible with as many peripherals as possible. For example, almost every application need to write to display, and many applications also support printer output. The problem here is that since a program should be able to run on different types of devices, it is impossible to let t
4、he programmer know the details of every device and write code to support it beforehand. The solution is to introduce GDI between the hardware and the programmer. Because it is a standard interface, the programmer doesnt have to have any knowledge on the hardware in order to operate it. As long as th
5、e hardware supports standard GDI, the application should be able to execute correctly. Device Context As a programmer, we do not output directly to hardware such as display or printer. Instead, we output to an object that will further realize our intention. This object is called device context (DC),
6、 it is a Windows object that contains the detailed information about hardware. When we call a standard GDI function, the DC implements it according to hardware attributes and configuration. Suppose we want to put a pixel at specific logical coordinates on the display. If we do not have GDI, we need
7、the following information of the display in order to implement this simple operation: 1 Video memory configuration. We need this information in order to convert logical coordinates to physical buffer address. 2 Device type. If the device is a palette device, we need to convert a RGB combination to a
8、n index to the color table and use it to specify a color. If the device is a non-palette device, we can use the RGB combination directly to specify a color. Because the actual devices are different form one type to another, it is impossible for us to gather enough information to support all the devi
9、ces in the world. So instead of handling it by the programmer, GDI functions let us use logical coordinates and RGB color directly, the conversion will be implemented by the device driver. GDI Objects In Windows , GDI objects are tools that can be used together with device context to perform various
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中设计图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 计算机专业 外文 资料 翻译
