PHP Get Shape Coordinates From Points
Im sure if the title is exactly what I am trying to describe so sorry if it isnt.
Ok here is what i am trying to do:
What i want to do is create a function that you can enter unlimited ammount of coordinates ( the blue dots) and then it will create a shape like so and then return all coordinates the shape covers. Because this is for working with pixels, there will be no decimal coordinates.
Something that can be used like so:
print_r(get_coords(12,6, 23,13, 30,9, 37,24, 24,34, 25,24, 7,30, 6,15));
// ^ Will output an array of all x and y coordinates that the shape covers
How would i go about d开发者_JAVA百科oing something like this?
http://php.net/imagefilledpolygon
精彩评论