gzz-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gzz] PEG 1003


From: Benja Fallenstein
Subject: Re: [Gzz] PEG 1003
Date: Fri, 06 Sep 2002 17:08:07 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020615 Debian/1.0.0-3

Benja Fallenstein wrote:

The information EVERY vob (I think) needs to draw itself is:
- a position on the screen
- a shape for clipping

The clipping shape can be set in the drawing context before the vob is asked to draw itself, so that the vob needn't worry about it.

In affine coordinate systems, for EVERY vob we also need:
- unit vectors of the affine transformation, for rotation/scaling/skewing

This, too, can AFAIK be set in the graphics context before the vob is called.

Finally, SOME vobs (which draw a border around something) will also need a shape to draw themselves in. This shape will often be the clipping shape for some other vobs.


Going from vobs to coordinate systems, there are several options. For example, we could say that coordinate systems are only for transformation, and shapes are given in an orthogonal structure.

However, it seems better to couple the two: for example, when we place a cell into a window, we both want to translate and clip by the window's coordinates, and use the same scaling information as the coordsys the window is placed inside.

Ok, how about this:
- Each cs MAY have a shape.
- If it does have a shape, for now it's a box (specified by width and height). - Cell border/background vobs need to be placed into a cs having a shape. They draw themselves as that shape.
- As proposed by Tuomas, each cs has a "clippedBy" coordinate set.
- The clipping area of a cs is the intersection of its shape (if any) with the shape of its clippedBy cs (if any) and with the shape of the clippedBy cs's clippedBy cs (if any) and so on, up to the root cs.

The interface could well be Tuomas' proposed coorders.java, but it would be different on the vobs' side: A vob could ask, "What is my position and size?" and draw itself into that rectangle. (It could also ask "What is my position?" and ignore the size-- this is what text vobs would be supposed to do.) They wouldn't have to worry about the "nasty case" from the Graphics tech report, because all this would be ORTHOGONAL to scaling (and rotation): The affine transformation and the clipping would be set in the graphics context before the vob is even called, and they would NOT be influenced by the "width" and "height" as passed to the vobs.

- Benja





reply via email to

[Prev in Thread] Current Thread [Next in Thread]