On Tue, Sep 12, 2006 at 01:10:16PM -0400, Matt Lavin wrote:
> First things first; I'm new to this list, so if I say anything wrong 
> just blame it on that.
> 
> I'm currently trying to use GTK-DFB and I need it to support 
> multi-vertex polygons (with self-intersections allowed), however the 
> current code (as of GTK 2.10.3) only supports 3 sided polygons.  I've 
> implemented a general purpose polygon fill algorithm and I'm trying to 
> find the best way to integrate it with GTK-DFB.
> 
> I've got a couple of questions:
> 1.  Is this the right mailing list to talk about contributions to 
> GTK-DFB?  (All of my following questions assume yes).

This list is fine.

> 2.  My implementation of the fillPolygon function consists of a couple 
> different helper functions and I'd like to know whether the fillPolygon 
> function should live in a c/h file by itself or whether it should be 
> squeezed into gdkdrawable-directfb.c?
> 3.  The current code uses FillTriangle for drawing the 3 sided polygon 
> but my implementation works by scanlines.  Should the 3 sided case 
> continue to be covered with FillTriangle or should the general purpose 
> fill be used for all types?

FillTriangle has less overhead. Does GTK have a shape hint like X? If it 
does maybe it would make sense to draw all convex polygons with 
FillTriangle().

> 4.  The current code seems a bit strange when it comes to clipping.  The 
> gdk_directfb_clip_region is retrieved and iterated over, setting the 
> clip and drawing a triangle for each clip rect.  I would have expected 
> the list to be iterated over while updating the clip and then just one 
> triangle would be drawn at the end.  Is the current code right?

The code looks correct to me. DirectFB has just one clipping rectangle. 
Some hardware may support more but (IIRC 3 for ati128 for example) but 
that feature isn't exposed by DirectFB.

-- 
Ville Syrjälä
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to