互联网浏览器使用什么来渲染?

发布于 2024-09-16 01:45:50 字数 225 浏览 6 评论 0原文

非常快,我一直想知道,互联网浏览器是否使用渲染操作系统 API 函数来创建按钮、渲染法师等,或者它们自己渲染这一切?

我首先想到它使用系统API,但是有一些效果,例如当屏幕淡入灰色时,你只能看到中间的小窗口,你知道,这种效果在许多在线相册中使用,我真的不知道如何使用它来实现例如仅 Win32 调用。

编辑:更准确地说,我知道屏幕上的最终绘图将始终使用系统 API,但您可以根据需要发送预渲染图像。谢谢。

very quick one, I was always wondering, do internet browsers use for rendering OS API functions to create buttons, render mages and so, or do they render it all on their own?

I first thoght that it uses system api, but there are some effects like when screen fades into grey and you see only small window in the middle, you know, thet effect used on many picture albums online, which I dont really how to achive using for example only Win32 calls.

EDIT: To be more exact, I know that final drawing on screen will always use system API, but you can send prerendered image as you want to it. Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

绅士风度i 2024-09-23 01:45:50

Web 浏览器使用自己的渲染引擎而不是操作系统 API。使用OS API来渲染按钮完全取决于特定渲染引擎的设计决策。然而,为了在各种操作系统上运行,这些引擎更喜欢自己的渲染,以跨平台提供相同的外观。

  • Gecko,适用于 Firefox
  • Trident,适用于 Internet Explorer
  • Presto,适用于 Opera
  • KHTML,适用于 Konqueror
  • WebKit,适用于 Apple 的 Safari和谷歌的 Chrome 网络浏览器。

参考:http://en.wikipedia.org/wiki/Web_browser_engine

Web browsers use their own rendering engines rather than OS API. Using OS API to render buttons totally depends on the design decision of a particular rendering engine. However, to run on various operating systems these engines prefer their own rendering to offer same look-n-feel across platforms.

  • Gecko, for Firefox
  • Trident, for Internet Explorer
  • Presto, for Opera
  • KHTML, for Konqueror
  • WebKit, for Apple's Safari and Google's Chrome web browsers.

Ref: http://en.wikipedia.org/wiki/Web_browser_engine

终止放荡 2024-09-23 01:45:50

浏览器渲染引擎是否使用 OS API 来创建按钮、编写文本、创建框等,或者它们是否使用 OS API 自己渲染所有这些内容,以便在屏幕上实际显示渲染的图像?

我实现了一些浏览器渲染引擎(参见例如 支持的元素表< /a> 和 支持的属性 获取 HTML 列表它支持的元素和 CSS 属性)。

我使用系统 API(.NET Framework API,它们是底层 O/S GDI API 的薄包装)来:

  • 测量单词(文本字符串)
  • 绘制单词
  • 绘制线条和方框
  • 用纯色填充矩形

这些是 API 功能类型由 Windows GDI 实现。

我还使用一些系统(O/S 或 .NET)API 来绘制按钮和组合框(请参阅重写标准控件,例如编辑、组合等?)。

因为,文本、图形等的整个渲染似乎很难完全由您自己编写

,是的,实现 CSS 和所有内容确实需要一段时间。您已经看到浏览器开发团队花了多长时间来实施:几个日历年,许多人年。

Do browser rendering engines useOs api for creating buttons, writing text, creating boxes, etc., or do they render all of this on their own using OS API just for actually show the rendered image on the screen?

I implemented something of a browser rendering engine (see e.g. Table of Supported Elements and Supported Properties for a list of the HTML elements and CSS properties that it supports).

I use system APIs (.NET Framework APIs, which are thin wrappers around underlying O/S GDI APIs) to:

  • Measure words (strings of text)
  • Paint words
  • Draw lines and boxes
  • Fill rectangles with solid color

These are the kind of API functionality that's implemented by the Windows GDI.

There are also some system (O/S or .NET) APIs that I use, to draw buttons and combo boxes (see Rewrite standard controls like edit, combo, etc?).

Becouse, the whole rendering of text, graphics and so seems pretty hard to write completely yourself

Yes, implementing CSS and everything does take a while. You've seen how long it took the browser developer teams to implement: several calendar years, many person-years.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文