[Y-devel] Cairo 2D drawing library.

Sebastian Faubel sfaubel at gmx.de
Thu Feb 26 17:45:20 GMT 2004


Hi!

> Beautiful screen shots. An OS X user would feel right at home. 

wich screenshots, did i miss out something?

> How far 
> do you plan to extend the use of vector drawing?

I plan to extend the drawing capabilities of the pixelbuffer with cairo.

> I think it would be a 
> crazy waste of CPU on the window server to draw widgets with vectors, 
> if it was even possible.

It is in deed possible, and i don't think that it is a cray waste of cpu
time for certain reasons. But you are right, there has to be
"non-vector" alternative drawing methods for systems with very little
recources.

A possible solution would be to provide basic pixel drawing methods as
they are implemented right now and besides having a set of vector
drawing methods (in the best case it is possible to load them
dynamically) and let the current theme decide which to use.

You have to also consider that systems with low recources do not benefit
from alpha-transperency and all the nice eye candy which Y is capable
of.

> We are simply not at a point where it makes sense to do that.

I think there are some cases where this really makes sense, not only for
esthetical reasons.

Apple added a new widget set to the current "Panther" release of ther
OS, which is called "mini". In applications where a lot of controls, or
widgets are needed ( i.e. in 3D rendering apps ), it makes sense to
provide very small versions of the default widgets, so that the
developer doesn't have to implement them by their selves...

Also think of a PDA, there it makes sense to have small versions of the
native widgets...

The usability guys will throw a party because some people with visual
disabilities can scale up the whole widget, not only the text.

Vector based widgets solve a lot of problems assiciated with pixel based
ones, but take up more CPU power. On most modern systems however,
there's really a lot of accelerated graphics hardware which is capable
of a lot more things than just calculating a 2D image.

> Then again, to run with the idea of re-sizable 
> controls, certain controls would look pretty beautiful if you could 
> re-size them dynamically and cache the results in a bitmap or whatever.

Because the on-screen "result" of a vector graphic is always a bitmap,
it is no problem to cache them. You also don't need to rasterisize them
anytime you need one i.e. of the same kind of widget. This however will
most likly not be implemented in the first releases.
 
> There is good and bad, however, since the interface will look demented 
> if the same control is slightly different sized in different windows 
> and/or different applications. You could always set certain 
> restrictions on sizes to enforce some kind of consistency.

Correct. I think it makes sense to store some information about the
proportions the widgets have in relation to each other and leave the
actual size up to the user. In this way we can keep a lot of consitency
of the UI altogether with the ability of free scaling.

> But in, say, 
> a tool bar, complete freedom would be pretty nice. The extreme, 
> however, is something like the dynamic resizing of the dock in Mac OS 
> X. Scaling bitmaps is not that big a deal -- if the images in the dock 
> were vector based, your computer would screech to a halt trying to 
> resize them dynamically.

Scaling a bitmap is more a deal than scaling a vector graphic. Upscaling
a bitmap, you have to recalculate the the missing pixels somehow. This
looks ugly and needs extra system recources.

Upscaling a vetcor graphic you "only" have to recalculate the image,
which takes up almost the same cpu capacity ( in the VGA or CPU ) but
ends up in a clean image.

greetings,

sebastian




More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved