本文介绍了GDI +只是GDI之上的一层还是其他新东西?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当GDI +发布时,我记得所有关于在Windows中显示内容的新的,更快的,更好的"方式的烦恼.但是每次查看时,在我看来,它实际上只是GDI的COM包装.

When GDI+ came out, I remember all the brouhaha about how it was the "new, faster, better" way to display stuff in Windows. But everytime I looked at it, it seemed to me that it was really just a COM wrapper around GDI.

是真的吗?还是GDI +真的是一个独立的图形库,只与GDI共享一些范例?

Is that true? Or is GDI+ really an independent graphical library that simply shares some paradigms with GDI?

我个人不确定它如何独立,但是我从未见过一种确定的陈述.

Personally, I'm not sure how it could be independent, but I never saw a definite statement one way or another.

推荐答案

图形硬件加速了许多GDI功能,并且某些GDI +例程可能在下面使用GDI.但是大多数GDI +是独立于GDI的.

Many GDI functions are accelerated by the graphics hardware, and some GDI+ routines may use GDI underneath. But most of GDI+ is independant of GDI.

一个重要的,很明显的例子是文本渲染.在GDI +中,文本渲染完全在软件中完成;无需视频卡即可完成抗锯齿,字形像素拟合和其他效果.

An important, and telling, example is text rendering. In GDI+ text rendering is done completely in software; the anti-aliasing, glyph pixel-fitting and other effects is done without the video card.



微软的克里斯·杰克逊(Chris Jackson)有一篇有趣的博客文章,其中他介绍了 GDI和GDI +中的文本呈现之间的速度差异:

Microsoft's Chris Jackson had an interesting blog post where he profiled the speed difference between text rendering in GDI and GDI+:

另一个例子是线条图. GDI +支持抗锯齿的线/多边形和圆/椭圆图形,而GDI不支持:

Another example is line drawing. GDI+ supports anti-aliased line/polygon and circle/ellipse drawing, while GDI does not:









这篇关于GDI +只是GDI之上的一层还是其他新东西?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 14:29
查看更多