欢迎来到毕设资料网! | 帮助中心 毕设资料交流与分享平台
毕设资料网
全部分类
  • 毕业设计>
  • 毕业论文>
  • 外文翻译>
  • 课程设计>
  • 实习报告>
  • 相关资料>
  • ImageVerifierCode 换一换
    首页 毕设资料网 > 资源分类 > DOC文档下载
    分享到微信 分享到微博 分享到QQ空间

    计算机专业外文资料翻译

    • 资源ID:124130       资源大小:98.50KB        全文页数:9页
    • 资源格式: DOC        下载积分:100金币
    快捷下载 游客一键下载
    账号登录下载
    三方登录下载: QQ登录
    下载资源需要100金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。

    计算机专业外文资料翻译

    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

    10、 drawings. They are designed for the convenience of programmers. The following is a list of some commonly used GDI objects: GDI objects Usage Pen Used to draw line, curve, the border of a rectangle, ellipse, polygon, etc. Brush Used to fill the interior of a rectangle, ellipse, polygon with a specif

    11、ied pattern Font Used to manage a variety of fonts that can be used to output text Palette Used to manage colors on a palette device Bitmap Used to manage image creating, drawing, manipulating, etc The above GDI objects, along with device context, are all managed through handles. We can use the hand

    12、le of an object to identify or access it. Besides the handles, every GDI object has a corresponding MFC class. The following is a list of their handle types and classes: Object Handle Type MFC Class Object Handle Type MFC Class Device Context HDC CDC, CClientDC, CWindowDC, etc. Pen HPEN CPen Brush H

    13、BRUSH CBrush Font HFONT CFont Palette HPALETTE CPalette Bitmap HBITMAP CBitmap Obtaining DC As a programmer, most of the time we need to output to a specific window rather than the whole screen. A DC can be obtained from any window in the system, and can be used to call GDI functions. There are many

    14、 ways to obtain DC from a window, the following is an incomplete list: 1 Call function CWnd:GetDC(). This function will return a CDC type pointer that can be used to perform drawing operations within the window. 2 Declare CClientDC type variable and pass a CWnd type pointer to its constructor. Class

    15、 CClientDC is designed to perform drawing operations in the client area of a window. 3 Declare CWndowDC type variable and pass a CWnd type pointer to its constructor. Class CWindowDC is designed to perform drawing operations in the whole window (including client area and non-client area). 4 In MFC,

    16、certain member functions are designed to update applications interface (i.e. CView: OnDraw (). These functions will automatically be call ed when a window needs to be updated. For this kind of functions, the device context will be passed through one of functions parameters. Using DC with GDI Objects

    17、 Before calling any function to perform drawing, we must make sure that an appropriate GDI object is being selected by the DC. For example, if we want to draw a red line with a width of 2, we must select a solid red pen whose width is 2. The following steps show how to use DC together with GDI objec

    18、ts: 1 Obtain or create a DC that can be used to perform drawing operations on the target window. 2 Create or obtain an appropriate GDI (pen, brush, font) object. 3 Select the GDI object into the DC, use a pointer to store the old GDI object. 4 Perform drawing operations. 5 Select the old GDI object into the DC, this will select the new GDI object out of the DC. Destroy


    注意事项

    本文(计算机专业外文资料翻译)为本站会员(泛舟)主动上传,毕设资料网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请联系网站客服QQ:540560583,我们立即给予删除!




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们
    本站所有资料均属于原创者所有,仅提供参考和学习交流之用,请勿用做其他用途,转载必究!如有侵犯您的权利请联系本站,一经查实我们会立即删除相关内容!
    copyright@ 2008-2025 毕设资料网所有
    联系QQ:540560583