Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
160 user(s) are online (147 user(s) are browsing Forums)

Members: 2
Guests: 158

Petrol, jabirulo, more...

Support us!

Headlines

 
  Register To Post  

Trapezoids??
Just can't stay away
Just can't stay away


See User information
The Qt X11 renderer uses trapezoids to render with XRenderCompositeTrapezoids. I am trying to use the code to render with CompositeTags, but all I get is this mishmash of triangles.

XRender defines a trapezoid as

{
A,B,C,D
top, bottom
}

...where A,B,C and D are points (x,y) and top and bottom are floats.

Now my question is this: What role does the top and bottom values play?? As far as I can see, it is enough with four points to define a trapezoid, so why are the top and bottom values needed??

Go to top
Re: Trapezoids??
Home away from home
Home away from home


See User information
I found

typedef struct _XTrapezoid {
            
XFixed  topbottom;
            
XLineFixed  leftright;
        } 
XTrapezoid;


where

typedef struct _XPointFixed {
            
XFixed  xy;
        } 
XPointFixed;

        
typedef struct _XLineFixed {
            
XPointFixed p1p2;
        } 
XLineFixed;


This from :
http://www.x.org/archive/X11R7.5/doc/libXrender/libXrender.txt

Is your information correct?

Go to top
Re: Trapezoids??
Just can't stay away
Just can't stay away


See User information
@broadblues

Yes, that's the information I have. Eg. they use fixed point and not floating point, but apart from that I think my description fits.

I might have to write my own triangulator, which is dull, but I would rather that than have to invoke the glu triangulator (trying to get rid of opengl alltogether).

Go to top
Re: Trapezoids??
Just popping in
Just popping in


See User information
@alfkil

from renderproto.txt (Trapezoids)
Quote:
[...] For each trap, the area between the left and right edges is filled from the top to the bottom. [...]


So my guess would be they are some sort of limitation for the fill operation?

Go to top
Re: Trapezoids??
Just can't stay away
Just can't stay away


See User information
@Gazelle

Yes, I think that is it. Managed to make it work with some copy/pasted code from the OpenGL triangulator .

Go to top
Re: Trapezoids??
Just can't stay away
Just can't stay away


See User information
Alfkil: yeah!

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project