







Moderators: electrogear, exonerate

DigitalWhiteByte wrote:Another small example of how to implement a "Mouse Over Area", geometrically customized.
aliasant wrote:DigitalWhiteByte wrote:Another small example of how to implement a "Mouse Over Area", geometrically customized.
SM crashes for me when I try to load this.
Maybe you have a Live Audio out thats not compatible with my pc?
MegaHurtz wrote:cool


MegaHurtz wrote:expert graphix guy
int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy)
{
int i, j, c = 0;
for (i = 0, j = nvert-1; i < nvert; j = i++) {
if ( ((verty[i]>testy) != (verty[j]>testy)) &&
(testx < (vertx[j]-vertx[i]) * (testy-verty[i]) / (verty[j]-verty[i]) + vertx[i]) )
c = !c;
}
return c;
}
Argument | Meaning
nvert = Number of vertices in the polygon. Whether to repeat the first vertex at the end is discussed below.
vertx, verty = Arrays containing the x- and y-coordinates of the polygon's vertices.
testx, testy = X- and y-coordinate of the test point.
aliasant wrote:There is another way to do that. Just create an image in 2 colors and if the mouse hovers over a pixel that has color "A" then True. Havn tested that yet but Im gonna waste some time on it now.
aliasant wrote:(I know Im of track but my other option is to do something real like paying a couple of bills.....)
,
DigitalWhiteByte wrote:MegaHurtz wrote:cool
But on this I would need help of some expert in graphics.![]()

Users browsing this forum: No registered users and 2 guests