[Top][All Lists]

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

Re: [Fenfire-dev] Proposed change to VobCoorder.RenderInfo

From: Matti Katila
Subject: Re: [Fenfire-dev] Proposed change to VobCoorder.RenderInfo
Date: Sat, 3 Jul 2004 14:22:36 +0300 (EEST)

On Sat, 3 Jul 2004, Benja Fallenstein wrote:
> In address@hidden, I've changed Vob.RenderInfo to the
> following interface:

I think it would be nice if you could use your own branch and after 
audit merge. It's easy for me to get your changes and revert them with tla 
undo after audit if necessary. It's also easy to make a new branches. And 
of course it would be nice to get only the best changes in main branch. 
For example the other can say simply that "please make the 
documentation more readable" or something. Because those are usually 
cases where we are lazy ;)

And the most important point (for me, at least) is to get *feedback*. 
Please say if you don't like it =)

> |   public static abstract class RenderInfo extends java.awt.Rectangle {
> |     public float scaleX, scaleY;
> |
> |     /**The background color of the canvas where we're being drawn.
> |      *               What about background images?!?
> |      */
> |     public abstract Color getBgColor();
> |
> |     public abstract void xform(float x, float y, Point into);
> |     public abstract void xform_horiz(float x, float y, Point into);
> |     public abstract void xform_vert(float x, float y, Point into);
> |
> |     /** Perform the inverse transformation, if possible.
> |      * Into the (-1..1, -1..1) cs
> |      */
> |     public abstract void invert(float xs, float ys, float[] xyout);
> |   }

I think the change is ok because in AWT everything is basically just 
rectangles. Only one thing comes in mind, that is in some cases you want 
use rectangles "as stack". It's more easy to say an example with color attrib:

Color putColorInStack = info1.getCurrentColor();
// draw something
// and finally

> I also removed getMixedFgColor(), because it wasn't really used
> usefully, and the commented out getMixedBgFract(), and added scaleX and
> scaleY. The latter two tell the vob how much it is stretched in X- and
> Y-direction; this can be used, for example, to draw a stretched
> rectangle correctly.

Where is that mysterious invert used?
scaleXY are ok definitely (though text doesn't stretch with awt?).

> I think that then, they should be replaced by the following two methods:
> |    public int x(float px) { return (int)(x + scaleX*px); }
> |    public int y(float py) { return (int)(y + scaleY*py); }


> I also think that the inverse() function, which then is a pure
> convenience function, isn't really needed and can be removed.

What it does?


reply via email to

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