GDI-Managed Bitmaps,Lines and Curves,Attributes: Brushes

http://msdn.microsoft.com/en-us/library/windows/hardware/ff566575%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为画刷分配内存并调用驱动实现该画刷)



<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(146) | 评论(0) | 转发(0) |
0

上一篇:内核模式GDI

下一篇:GDI/Driver Division of Labor

给主人留下些什么吧!~~
评论热议
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kelsel

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值