GTK+ to Use Cairo Vector Engine
Eugenia writes "GTK+ is now the first major toolkit to have added support for the Cairo 2D vector graphics library, which is designed to provide high-quality display and print output. GTK+ project leader Owen Taylor has commented on the X/GTK integration of Cairo. To put it in perspective, Cairo is similar to OSX's Quartz engine and Longhorn's Avalon (PPT analysis). The 3D hardware accelerated image compositing OpenGL part of Cairo will be provided by the Glitz library. Cairo is 'possible' to be part of Qt 4.x at a later date, according to Trolltech's Qt 4 technical preview document."
Now if we had some sort of open source 3D drivers to take advantage of this . Sure we have ATI and Nvidia binary drivers, but the uncertanties in the licensing pretty much keeps them from getting bundled in most distributions.
Oh well, at least it's a start to get some OS X-like eye candy.
Quartz handles vectors just fine: it's all PDF underneath which handles vectors just fine. Cocoa provides a number of classes to create and draw vectors images (ie: NSBezierPath).
The Aqua interface elements (brushed metal, gel buttons, title bars, wtc) are bitmaps but that's not a limitation of quartz.
Of course everything you see on the screen is eventually rasterized before being displayed - but that's a requirement for any display thats out puting to a CRT, LCD, etc.
Have a browse around Direct Rendering Open Source Project for details of video cards with open source 3D drivers.
The Internet's nature is peer to peer - 20050301_cs_profs.pdf
Actually, mono is currently using cairo a lot. In fact, their new Windows.Forms is switching to a native implementation. System.Drawing uses cairo. This implies gtk# as well. :D
----
Go canucks, habs, and sens!
when all the wanto-lick eye candy comes in bitmaps for OS X?
I know vector based GUI may reduce file sizes but to the cost of performance? I mean bitmap = load and display, vector = load and process then display not to mention that windows can be resized, be transparent, transform (maybe) and all of this needs CPU power. This is not counting that if it is done right then we all want a piece of it.
The tendency nowadays is to make files smaller and smaller which requires more and more processing power. When will we stick to something that has good speed and then just make it look good? Of course generally speaking. It's like always buying the latest processor chip, the biggest hard drive and the super thin and large monitor. There is always a faster one, bigger one, smaller... Whe do we stop to make something good out of what we have and then move to the next step??
No I didn't RTFA
No I will not fix your super computer
No I don't care about drivers being bundled with linux or not
Your bitmap are belong to us... got it?
Man I can't sleep!!!!
Have a good one. Have a good one.
===== "Every head is a different world so don't invade mine you FREAK!" smartSAGA said
NeXTSTEP and OPENSTEP didn't use vector graphics for a lot of the most commonly seen graphics. The buttons on windows, the application icons, and the buttons in various programs were all bitmaps.
Some programs exploited Display Postscript more than others, but on the whole, I'd expect to see a lot more vector graphics use in a typical free software OS in the next few years than I saw with NeXTSTEP and OPENSTEP. I was never much of a PS hacker, but I understand that PS can do a lot more than graphics work.
I own a NeXT cube system (currently in my attic, unused) which I used to use regularly from NeXTSTEP 2.1 through NeXTSTEP 3.2.
Digital Citizen
I have a better idea: let's shed some light on the apocryphs used in the story. Seriously, I had hard time to hunt all of those definitions. Here's a handy list of links for anyone who is not up to date with "ppd," "glitz" and other bloody-edge jargon:
- GTK+ *
- Cairo *
- X *
- X/GTK *
- OSX *
- Quartz *
- Longhorn *
- Avalon *
- PPT *
- 3D *
- OpenGL *
- Glitz *
- Qt *
- Trolltech *
I hope it helps. (Your comment has too few characters per line (currently 20.2).)What's your definition of "out"? From the Cairo download page, "Cairo is still under active development. The API is rapidly approaching stability, but is not quite there yet, so there is not yet any official "release" of cairo." So, Cairo is not a 1.0 release, or even a .01 release. Dev snapshots are available, in an unstable form (the API is "approaching" stability). How does this differ from the available technology preview of Avalon (aside from the openness of the source, of course)?
Both are still in pre-release stages. Both are available in a publicly-consumable form even though they've not reached API stability yet. Declaring one or the other the "winner" is still premature.
Oh, yeah, and Avalon will be available on XP and 2k3, not just Longhorn.
... Assuming (even cheap) OpenGL hardware. Like you say, the description is smaller. It is the description you are sending the GPU, be it triangles or pixels. That is where your bottlneck lies. GPUs are designed to process these triangles and and they do it FAST.
it looks like a nice feature, which will be good, for both gtk and qt. looking at the Cairo site, it looks to serve a purpose similar to SVG, which used to be the big buzzword.
can anyone tell us, is Cairo in direct competition with SVG applications? i notice cairo advertises "high quality...printing outputs" - is that its focus while SVG deals more with graphic displays and the web?
This is a big step forward. Something I've waited for a long time. If it is possible to unite all those vector-graphics efforts in cairo more time can be spent on "stuff that matters".
Well, I always hoped X11 would do this step but they seem to enjoy doing politics instead of standards... On the other hand this approach has some unique advantages:
Interesting is, that there are also java-bindings that work together with SWT which is an interesting step (mono is already on board -- see previous comments)
So hopefully the time of ugly graphics in platform-independent OpenSource-Software is finally over... (just watch OpenOffice -- uaaahh)
Well, a last wish: If Qt guys come aboard, this means KDE is in which on the other hand means that gnome and KDE join on the same backend... just dreaming...
> "GTK+ is now the first major toolkit to have added
/ gn ustep/core/back/Source/cairo/
> support for the Cairo 2D vector graphics library"
http://savannah.gnu.org/cgi-bin/viewcvs/gnustep
6 months later....
did someone actually read the _20 lines_ post made by Owen Taylor? He just commited gtk dependancy on cairo in the cvs repository, but that's all. Nothing's working on Cairo yet, not even font support.
I'm really not a fan of Windows, but they've been showing Avalon demos for a while now, so could you please at least wait for the Gtk team to reach a similar level before comparing their work to Microsoft's one, or Apple's(!)?
Now, if we are to speak about the possibilities offered by such technologies, I'd like to know your opinion on the topic guys.
I believe that the point the grandparent was trying to make was that Quartz buffers the rasterised image, not the vector source. This means that when you invoke something like Exposé which resizes a window without redrawing it you are scaling a bitmap, rather than a vector image. This is done for performance reasons (most graphics cards - even quite old ones - can handle scaling a bitmap quickly. Scaling and rendering vector images is more computationally expensive), although the trade-off is a slight loss in quality. I suspect that Apple will ship an updated backend to Quartz (as they did with Quartz Extreme) which buffers the vector data once they believe that enough of their install base has fast enough graphics cards to make it worthwhile.
I am TheRaven on Soylent News
PostScript is a Turing-Complete language. This actually makes it a bad choice for interactive graphics (i.e. not printing), because it is impossible to determine how long a piece of PS code will take to run in advance (or even if it will ever terminate - see the halting problem). Display PDF, used in Quartz, eliminates this problem, since PDF is a non-Turing-Complete subset of PS.
I own a NeXT cube system (currently in my attic, unused)
I don't suppose you're interested in selling it are you?
I am TheRaven on Soylent News
Canopy is also a major stakeholder in the SCO group
[...]
Do a little research and you'll find that Trolltech is going to answer any questions you may have regarding their connection to the Canopy Group, their board of directors, and the connections between same with a bland "no comment."
Well, Trolltech is not really secretive about their investors. Do a little research and you'll find this site. Out of the 9 parties and groups listed there, Canopy is number 7 and SCO number 9, with a combined share of about 5%. Now if you want to call that major... To me it would seem that Trolltech is majorly owned by it's employes.
With a little more research you even might find for axample this interview with the Trolltech President, where he talks about the Canopy investment:
-----
PF: Somebody mentioned that the Canopy Group & SCO owns some parts of Trolltech.
ME: Sorry, we don't have any influence on them.
PF: Do they have any influence on you?
ME: Not really. They have a 5.7% stake in Trolltech. Historically Canopy became an investor because we cooperated with Caldera. As you might know we made and delivered the graphic install, which was the first graphical install for Linux, for Caldera Linux. The Canopy Group as the main investor in Caldera was so impressed by the work we had done that they wanted to invest in Trolltech, to make sure that Trolltech could become a solid company that could continue to deliver software to the Linux community. It's pretty ironic to see what has happened historically after that of course. But they don't have any influence on Trolltech. Trolltech is employee-owned, 65% of the shares are owned by the employees and we control the business so they have a small stake in us and that is it.
PF: You haven't talk about this complicated with SCO on Linux
EE: The patent issue or the corporate issue?
PF: The thing that SCO is asking and preparing to sue everybody about some code they pretend they own in Linux.
EE: I can tell you that we do not support these actions from SCO. Trolltech in many ways is dependent on the success of Linux. We think Linux is a Good Thing. We support Linux in many ways. On the other hand everybody has the right to bring his case to court. In this case it is very strange that they have not pinpointed exactly where in the code there is a problem and we feel that if they really had a problem with this, they could have acted very differently in presenting this to the community. So again we do not support these actions.
------------------
Seems to be a quite complicated way to say 'no comment'.
People on the OS X side rave about the smooth opaque window moves and exposes under Aqua and try to portray it as if it were some advanced technology in OS X. But you can get the same behavior under X11--turn on "backing store", it's a server option. Lots of other systems had the same functionality, including AmigaOS (notable because it came out around the same time as the original MacOS).
The reason it isn't turned on by default is that that kind of buffering consumes a lot of memory. Furthermore, once you turn it on by default, software authors will not pay attention to redraw logic anymore and applications will become unusable without backing store.
X11 made the decision to leave it off by default, OS X made the decision to turn it on.
I looked at Cairo because it purported to be fixed point, which would have made it ideal for many embedded consumer products (which rarely have FPUs), and enabled them to have pretty OS X style graphics.
I was most disappointed when I found out it was only the API that was fixed point, and most of the internals used floating point.
FLTK 2.0 http://fltk.org/ is able to draw using Cairo too, by defining "USE_CAIRO" variable (--enable-cairo).
well I didn't measure it but it's -well- under 1s here so I don't know what's the trouble about...and while I'm at it, cairo does -not- slow down your system, if you would have read the article you would know that it does exactly the opposite (given you have an opengl-graphics card which works) gee, why do I do this anyways?..
Mesa-standalone is a GL layer that doesn't run through X.
XGL is an X server where everything displayed on screen is accelerated.
Cairo makes toolkit graphics vector.
Then it's all done, we'll party with hookers and coke while some guy from Sun complains loadly about daniels removing xeyes from the so called 'modular' tree...
this adds server-side support
No, it doesn't. This is still client-side. The X server knows nothing about GTK+ or Cairo.
There are discussions about putting Cairo in X (via RENDER?), but this is not it.
Lump lingered last in line for brains, and the ones she got were sorta rotten and insane.
Oh, yeah, and Avalon will be available on XP and 2k3, not just Longhorn.
So will Cairo. Remember that GTK+ is cross-platform. =D
So, is this or is this not what I've always been seeking in a GUI: total resolution independance? E.g. right now I can have my monitor at 800x600 and everything is *huge*, and I can have it at 1600x1200 and everything is *tiny*. Sure I can have Gnome/Gtk+ use larger icons and fonts. But not larger everything. Currently in Gtk+, one specifies the spacing between widgets in pixels. Will this change to vector units and allow the ability to smoothy scale everything up so I can use the full 1600x1200 but still have things readable? (And no, using a resolution in between those two extremes is not a solution. They are too few; none is quite right. Or it's an LCD where all but one is garbage.) And what will these vector units be?
Actually, I'm usually running at 1024x768. There's always those few programs that just don't fit on the screen... The ability to scale them down would be fantastic. Ideally I'd have an enormous monitor, but I don't.
If this is the direction this small step is headed in, then I applaud the Gtk+ team and look forward to the future with excitement.
I respectfully disagree. A high-performance rendering library depends heavily on being able to reason out the computational cost of operations. If these operations are open-ended expressions in the PS language, that cost cannot be known by the engine. If the operations are just the low-level primitives provided by the PS/PDF imaging model, then the cost can be known. This has everything to do with eliminating the unknown imposed by the use of the PS language.
The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...
Yes, you missed something. This has very little to do with the size of your icons.
This will allow all gtk application to render everything using cairo, much like gdk was used in the past. This makes high quality vector (and bitmap) operations available in gtk, where they weren't before. And the plan is to later accelerate this through the graphic cards GPU or 3d engine to make all graphics fast and smooth.
And you can have some honkin' big icons if you want...
Schrodinger's cat is either dead or really pissed off...
This isn't meant to be a troll or to point the blame on any one entity.
I think the current state of opengl on linux desktops in general can be a pain in the ass. Have an NVIDIA chip in my laptop so I'm pretty much forced to use NVIDIA's drivers if I want 3d acceleration. Now xorg has opengl drivers, but I must use the ones nvidia provides. Sometimes this means switching between interfaces just to get software to compile. To get kde's screen savers, I had to switch to xorg and then back to nvidia' opengl interface. Just to get matlab running, I had to switch to xorg opengl and keep it that way. Now I can't use nvidia's opengl drivers so I can't run any opengl screen savers as long as I plan on using matlab. X crashes if I even try to run glxgears.
So I don't know if it is because of xorg, nvidia, or mathworks, but opengl on my system is becoming a source of lots of problems. That said, will more opengl usage make things better because it will force others to fix the problems, or will I just end up with a system that requires different drivers for different apps and things won't run properly?
Cairo makes it trivial to scale all the drawing done by an application. The big step is that a toolkit such as GTK has to draw *everything* with Cairo. Then only a few small fixes to set the initial size of the windows and to back-transform the location of mouse clicks, you will be able to scale applications.
Yes it is quite possible that the resulting graphics will not be perfect. However at least it will be possible and easy to get to that point. This makes the hurdle of adjusting the graphics to look great much easier.
So the answer is that Cairo is a huge step in the direction you are talking about.
It already works.
Yes, it does if you can figure out how to build it yourself. When I say future, I mean when this is all released and distributers pick it up so that I can rpm it (or apt, as the case may be.) I have spent the past several days trying to build the freedesktop x server with the opengl goodies, and I haven't had much luck.
Schrodinger's cat is either dead or really pissed off...
Pango is what causes all of the problems with GTK apps being slow. It renders text very nicely - rich text support is all there, i18n support is right in, it can render antialiased bold multibyte kanji as easily as anything else. But the price of that is that it's very slow. I think Qt does some ascii optimisation so you only have the i18n stuff slowing you down if you need it.
I am trolling