Polygons revisited
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 9287
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Polygons revisited
Sorry, Happy people: been dead busy for a while so missed to comment on the recent thread over on the Use-List
re the possibility of polygons that look like this:
- -
Sad to tell, that's a fake, and a bad fake at that as it was made using GIMP.
As far as I can work out for this sort of thing to be possible each vertex of a polygon has to be a separate object and
have its own property profile, so a graphic object with this sort of possibility would have to be be a composite object in a similar way
that a dataGrid is.
re the possibility of polygons that look like this:
- -
Sad to tell, that's a fake, and a bad fake at that as it was made using GIMP.
As far as I can work out for this sort of thing to be possible each vertex of a polygon has to be a separate object and
have its own property profile, so a graphic object with this sort of possibility would have to be be a composite object in a similar way
that a dataGrid is.
-
- Livecode Opensource Backer
- Posts: 9287
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Polygons revisited
I would be most grateful if someone could explain what these bits are.
-
- Livecode Opensource Backer
- Posts: 9287
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
-
- VIP Livecode Opensource Backer
- Posts: 9579
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Polygons revisited
If you have a regular polygon, that grc has no points, though it has effective points. So do this.
1- Make a regular polygon.
2- Make a polygon grc.
3 - Set the points of the polygon to the effective points of the regular.
4- Lose the regular.
5- In the inspector for the poly, place a blank line after every TWO lines of the points, so that you get something like this:
Craig
1- Make a regular polygon.
2- Make a polygon grc.
3 - Set the points of the polygon to the effective points of the regular.
4- Lose the regular.
5- In the inspector for the poly, place a blank line after every TWO lines of the points, so that you get something like this:
Code: Select all
294,167
244,252
146,252
96,167
146,82
244,82
294,167
-
- VIP Livecode Opensource Backer
- Posts: 9579
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Polygons revisited
Well, one should not be too clever or cavalier. It turns out that one cannot easily color the interior of a polygon graphic if it has blank lines in its list of points.
I suppose one could alway underlay a "regular" polygon, perhaps the very one used to create the polygon graphic, instead of losing it, and color that:
My first one, Richmond. You were right to direct me down that path.
Craig
I suppose one could alway underlay a "regular" polygon, perhaps the very one used to create the polygon graphic, instead of losing it, and color that:
My first one, Richmond. You were right to direct me down that path.
Craig
-
- Livecode Opensource Backer
- Posts: 9287
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Polygons revisited
All graphic objects in LiveCode have a bounding rectangle, and that may be part of the problem
aas what they need are for their vertices to be their boundaries, and then the possibility for
each vertex to be set as visible or invisible, and the 'fill' of a graphic object not to depend
on the visibility of individual vertices.
aas what they need are for their vertices to be their boundaries, and then the possibility for
each vertex to be set as visible or invisible, and the 'fill' of a graphic object not to depend
on the visibility of individual vertices.