Page 1 of 2

Complex Polygon in PocketFrog

PostPosted: Mar 16, 2005 @ 6:19pm
by J.-V.

PostPosted: Mar 16, 2005 @ 6:42pm
by Kzinti

PostPosted: Mar 16, 2005 @ 11:34pm
by J.-V.
I can't split polygons.
I want to draw complex polygon as CDC function Polygon.
for example, using this points, function must draw 2 separate squares:
points[0].x = 10;
points[0].y = 10;
points[1].x = 110;
points[1].y = 10;
points[2].x = 110;
points[2].y = 110;
points[3].x = 10;
points[3].y = 110;
points[4].x = 10;
points[4].y = 10;

points[5].x = 120;
points[5].y = 120;
points[6].x = 220;
points[6].y = 120;
points[7].x = 220;
points[7].y = 220;
points[8].x = 120;
points[8].y = 220;
points[9].x = 120;
points[9].y = 120;

and using this - frame (20 pix width)
points[0].x = 0;
points[0].y = 0;
points[1].x = 100;
points[1].y = 0;
points[2].x = 100;
points[2].y = 100;
points[3].x = 0;
points[3].y = 100;
points[4].x = 0;
points[4].y = 0;

points[5].x = 20;
points[5].y = 20;
points[6].x = 80;
points[6].y = 20;
points[7].x = 80;
points[7].y = 80;
points[8].x = 20;
points[8].y = 80;
points[9].x = 20;
points[9].y = 20;

PostPosted: Mar 17, 2005 @ 8:29am
by Conan

PostPosted: Mar 17, 2005 @ 9:08am
by Andy

PostPosted: Mar 17, 2005 @ 9:47am
by J.-V.

PostPosted: Mar 17, 2005 @ 6:14pm
by J.-V.

PostPosted: Mar 18, 2005 @ 11:10am
by Guest

PostPosted: Mar 18, 2005 @ 3:38pm
by fast_rx

PostPosted: Jul 29, 2005 @ 8:44am
by Yuriy

PostPosted: Jul 29, 2005 @ 9:16pm
by fast_rx
Thanks for the code - especially the surface texture one.

For everyone else that hasn't tried it yet, I'll attach a pic.

The texture is repeated to fill the entire poly - which may be desirable or not...

Anyway, I may run a benchmark to see just how much faster it is.

PostPosted: Aug 2, 2005 @ 8:34am
by Pejo Software - Per

PostPosted: Aug 2, 2005 @ 2:22pm
by fast_rx

Unable to draw semi-off screen poly

PostPosted: Jan 21, 2009 @ 12:00pm
by jaluna
Hi all,

I have tested this function because I need to render complex polygons, however it don't work when some vertex of polygon are off screen.

For example, try to draw this rectangle

P1.x = 50; P1.y = -50;
P2.x = 100; P2.y = -50;
P3.x = 100; P3.y = 50;
P4.x = 50; P4.y = 50;

I have expected that this function render the part inside the screen but nothing is rendered. However, the original function FillPoly (that does not work with complex polygons) produce the expected result.

Image

There are a bufix for this function?

Thanks!

PostPosted: Jan 21, 2009 @ 6:42pm
by Kzinti
Congrats, you just resurrected a 4.5 years old thread. Most of the people (if not all) on this thread don't visit here anymore.