The Road to KDE 4: SVG Rendering in Applications  

原文地址:http://dot.kde.org/1167723426/
主要是KDE4的一个改进:应用程序的SVG渲染.
SVG,可缩放矢量图形Scalable Vector GraphicsSVG)是基于可扩展标记语言(XML),用于描述二维矢量图形的一种图形格式。SVG由W3C制定,是一个开放标准

SVG严格遵从XML语法,并用文本格式的描述性语言来描述图像内容,因此是一种和图像分辨率无关的矢量图形格式。SVG图形格式具有以下优点:

  1. 图像文件可读,易于修改和编辑
  2. 与现有技术可以互动融合。例如,SVG技术本身的动态部分(包括时序控制和动画)就是基于SMIL标准。另外,SVG文件还可嵌入JavaScript(严格的说应该是ECMAScript)脚本来控制SVG对象
  3. SVG图形格式可以方便的建立文字索引,从而实现基于内容的图像搜索
  4. SVG图形格式支持多种滤镜和特殊效果,在不改变图像内容的前提下可以实现位图格式中类似文字阴影的效果
  5. SVG图形格式可以用来动态生成图形。例如,可用SVG动态生成具有交互功能的地图,嵌入网页中,并显示给终端用户.
SVG技术细节

SVG主要支持以下几种显示对象:

  1. 矢量显示对象,基本矢量显示对象包括矩形、园、椭圆、多边形、直线、任意曲线等
  2. 嵌入式外部图像,包括PNGJPEG、SVG等
  3. 文字对象

SVG可以实现动态和交互功能。在DOM模型的基础上,SVG开发设计人员可以利用ECMAScript或者SMIL来进行时序控制或对象的操纵。SVG虽然是文本格式,但是SVG支持利用gzip压缩算法减少文件尺寸,压缩后的文件通常用被称为「SVGZ文件」。

以上内容来自维基百科

看不了wikipedia可以试一下这个网页代理http://www.in2play.net/poxy-0.4

下面的图片对比了使用SVG渲染的KDE4和未使用SVG的KDE的效果,变化确实比较大,显示效果变得非常华丽。

不过我在gnome上使用svg格式的图标,会明显地减慢响应速度,不知道KDE4速度怎么样。

Since KDE 4 development is in full swing with plans for a KDE 4.0 release sometime later this year, I thought I'd put together a weekly piece entitled The Road to KDE 4. The idea is to have a short overview of one or two of the features that show progress in KDE 4. For my first issue, the goal is to show off some of the great SVG work that has taken place so far. Read on for the details...

Since many features are covered in personal blogs via the KDE Planet, I'll try to cover those that receive less public coverage, or need more public coverage.

The first thing I'd like to point out is that KDE 4 builds, installs, and runs well enough that I can test many of the ported KDE 3.x applications, and most of them are pretty stable. The real joys come when you look more closely at those improvements that are afforded by the changes in the base technologies. Today, I'll talk about one of the eyecandy features provided by Qt 4: SVG rendering in applications.

There are many other KDE applications reaping the benefits of SVG drawing to make them more pleasing, and more scalable. Check out some of these posts:

  1. Albert Astals Cid renovates blinKen
  2. KDE 4 games SVG status wiki

Today I'm going to focus on a handful of apps, providing before and after screenshots to compare the KDE 4 development version (pre-alpha stuff) to the existing KDE 3.5.5 equivalents.


To begin, I'll look at the KDE System Guard, a useful utility packed into KDE that you can pull up as 'ksysguard'. It does all sorts of neat things like display charts of memory and CPU usage, and a process table (also accessible via the Ctrl-Esc keyboard shortcut).

Here's how it looked in KDE 3.5.5:

ksysguard in kde 3.5.5

And now, in the KDE 4 development series (the lines are antialiased, the graphs are translucent and the backgrounds are SVG):

ksysguard in kde4 devel

As you can see, it is visually much improved from its current and very functional form.


Next we'll look at some of the diversions shipped in the kdegames package. KAtomic is a puzzle game. It's fun, semi-educational, and could definitely have used an image overhaul. Here it is in it's spartan KDE 3.5.5 glory:

katomic in  kde 3.5.5

And now, with much improved oxygen-style graphics in the development series:

katomic in kde4 devel


KMahjongg ships in the kdegames package, and is a staple of puzzle gaming. Here it is from KDE 3.5.5 looking like a game that escaped from the Best of Windows Entertainment Pack:

kmahjongg in kde 3.5.5

And now, with a much-improved SVG-powered tileset in the development series:

kmahjongg in kde4 devel


And last but not least, is one of the more frequently used parts of KDE: the "Run Command" dialog (Alt-F2). Previously this:

kmahjongg in kde 3.5.5

Now, thanks to desktop interface guru Aaron Seigo, it's a SVG themable, really slick element of the Plasma desktop. Still a work in progress, but you'll get the idea from this screenshot.

krunner in kde4 devel

Until next time folks, when I reveal yet another KDE 4 feature under development. Cheers.

This entry was posted on Saturday, January 06, 2007 and is filed under . You can leave a response and follow any responses to this entry through the Subscribe to: Post Comments (Atom) .

1 comments

gang zhuang le ubuntu,hai bu zhi dao zen me yong shu ru fa ne ^_^ xue xi zhong