Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
59 user(s) are online (43 user(s) are browsing Forums)

Members: 0
Guests: 59

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 )



Polls
Running AmigaOS 4 on?
AmigaOne SE/XE or microA1 12% (26)
Pegasos2 3% (8)
X5000 22% (48)
X1000 14% (30)
A1222 8% (19)
Sam 440/460 18% (40)
Classic PowerPC Amiga 2% (6)
WinUAE emulation 7% (16)
Qemu emulation 9% (21)
Total Votes: 214
The poll closed at 2025/12/1 12:00
6 Comments


Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project