Boost logo

Boost :

From: Marcelo E. Magallon (mmagallo_at_[hidden])
Date: 2004-12-29 10:08:21


On Tue, Dec 28, 2004 at 05:28:15PM -0500, Alan Gutierrez wrote:

> > That's easy: you start with a vector description of *everything*
> > and plug a rasterizer where needed. This vector description in
> > Quartz is called DPS: Display PostScript.
>
> > This gives you the gimmicks you see on MacOS X, for example window
> > minimization and maximization effects. You just need to start
> > with a rectangle, and subdivide the edges, and apply some
> > transformation to them. Then you can use algebraic grid
> > generation to compute the inner grid. And now you only need to
> > apply the grid transformation to the elements of the window.
>
> So where can I learn about algebraic grid generation?

 I'm not at the office now, I'll write this down and mail you a couple
 of references next week. I think they could be useful for getting you
 started if you have interest in the topic. It's nothing more than just
 careful interpolation.

> I understand what you are saying architecure wise. Do you really
> feel that it is easy? Could it be cross-platform? I'm of a mind
> that you start with rendering soultions, rather than widgets.

 It's conceptually easy.

 The basic idea is that you need some sort of abstraction to display
 hardware, nothing new there. If you orient this abstraction towards
 raster devices like the screen, you basically tie both of your hands
 behind your back when it comes to dealing with significantly different
 devices like a printer or a text-based UI.

 If you start with vector graphics, rendering to the screen is easy,
 it's "just" rasterization (ok, it's full of pesky details, but that's a
 different thing). Rendering to a printer is either transforming your
 vector description to the printer's vector description (PostScript,
 ...) or rasterizing at a given resolution.

 There's still nothing new there.

 You could implement OS X's gimmicks on top of X11 or GDI, with some
 amount of pain involved. The problem is neither is particularly good
 at working with affine transformations or texture application or alpha
 blending or shading. Here's where Quartz shines. This is also what
 Cairo Graphics is trying to be.

 Could this be cross platform? It depends on what you mean by that.

 Would something like this work across platforms? Sure, why not?

 Would something like this work across platforms if you want to use the
 native widgets? Probably not.

 And yes, I tend to think about the rendering part of the problem
 because that's what I do and that's what interests me. It's also one
 of the spots that hinders portability: don't take it too far, think of
 something as simple as fonts. I would also like to see a nice event
 loop system (because that's one wheel I've reinvented many times
 already and I don't feel I've gotten it right yet), so if you start
 discussing that (from the Boost POV) I will pay closer attention :-)

 I my opinion GTK+ has got the whole UI thing right (or "as right as it
 can get"). They have clear boundaries between different parts of the
 system: rendering (with GDK as an abstraction on top of X11 and
 others), widgets (GTK+ itself), accessibility (ATK), text handling and
 rendering (Pango), themability. Where GTK+ sucks at is extensibility:
 it's a pain to write new widgets. The whole signaling business in GTK+
 is also awkward to say the least. GTKmm is an improvement over GTK+,
 but there are some corners which still feel somewhat "wrong" (perhaps
 because GTK+ is "still underneath")

 On the other hand I think Qt got and still gets the whole thing wrong.
 (That and the fact that they reinvented wheels that didn't need
 reinventing in the first place).

 I'm getting way off-topic...

        Marcelo


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk