Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1550792
  • 博文数量: 596
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 173
  • 用 户 组: 普通用户
  • 注册时间: 2016-07-06 15:50
个人简介

在线笔记

文章分类

全部博文(596)

文章存档

2016年(1)

2015年(104)

2014年(228)

2013年(226)

2012年(26)

2011年(11)

分类: Windows平台

2014-04-15 14:51:15

%28v=vs.85%29.aspx

  1. GDI-Managed Bitmaps

  2. GDI manages bitmaps in all DIB formats including 1, 4, 8, 16, 24, and 32 bits-per-pixel. GDI can do all line drawing, filling, text output, and bit block transfer (bitblt) operations on these bitmaps. This makes it possible for the driver to either have GDI do all graphics rendering, or to implement functions for which its hardware offers special support.
  3. (GDI以DIB格式管理位图,包括1,4,8,16,32位。GDI完成划线,填充,文字,位块传输。因此驱动可以让GDI完成图形渲染,或者实现驱动自有的渲染,通常是优于GID渲染的)

  4. If the device has a frame buffer in a DIB format, GDI can perform any or all graphics output directly to the frame buffer, thereby reducing the size of the driver. If the device uses a nonstandard-format frame buffer, then the driver must implement all required drawing functions. GDI can still simulate most drawing functions, although a performance cost is incurred: the pixels must be copied into a standard format bitmap before they can be operated on by GDI, and then be copied back to the original format after drawing is complete.
  5. (如果设备使用非标准的帧缓存,驱动必须实现对应的绘图函数。GDI能模拟大多数绘图函数,可能造成性能损失。流程如DDB转DIB,渲染,DIB转DDB。

  1. GDI-Managed Lines and Curves

  2. GDI offers improved definitions of lines and curves. Lines are not required to have integer endpoints in DEVICE coordinates, as was true for Microsoft Windows 3.x. This allows the driver to transform graphics objects without gross rounding. The fundamental curve in GDI is a Bezier curve (cubic spline) rather than an ellipse. All GDI internal operations are handled with Bezier curves, which are supported by most high-end devices. For devices that do not handle Bezier curves, GDI breaks curves down into line segments before calling the driver to draw them.
  3. (GDI提供直线和曲线的定义。直线在DEVICE坐标系中不需要整数端点,因此驱动转换图形设备时不需要转换。GDI中的基本曲线是贝塞尔曲线,而不是椭圆。所有的GDI内部操作都是以贝塞尔曲线的形式,大多数高端设备支持贝塞尔曲线。如果设备不支持,则GDI将曲线转为线段,再传递给驱动。)

  4. GDI can download regions to be filled in the form of paths, as well as rectangles. Drivers can decompose paths into trapezoids or spans for filling.

  1. GDI-Managed Attributes: Brushes

  2. GDI also manages all attributes. GDI passes attributes to the driver as brushes; the driver realizes these brushes by converting them to a useful internal form. GDI maintains this converted information for the driver. GDI also maintains all states of the brushes, including bounds, correlation, current position, and line style. The driver can cache information but is not assumed to maintain any state. Except for initialization and brush realization, GDI calls the driver only to draw on the device. GDI takes care of transformations, region locking, and pointer exclusion before it calls the driver.
  3. (GDI管理多个属性。GDI以画刷的形式传递属性给驱动;驱动接收到这些画刷后,转为内部格式。GDI为驱动管理这些转换后的信息。GDI也管理画刷的所有状态,包括bounds, correlation, 当前位置,线风格。驱动可以缓存这些信息但是不能假设任何状态。除了初始化和画刷实现,GDI调用驱动只在设备上绘图。

  4. Whenever a driver needs to use a brush not yet realized, it calls back to GDI. GDI allocates memory for the brush and calls the driver to realize it and, if necessary, dither it.
  5. (一旦驱动需要使用一个还未实例化的画刷,他将回调GDI。GDI为画刷分配内存并调用驱动实现该画刷)



阅读(486) | 评论(0) | 转发(0) |
0

上一篇:内核模式GDI

下一篇:GDI/Driver Division of Labor

给主人留下些什么吧!~~