Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to figure algorithm to draw and paint polygons
#17
I decided to keep it simple and just use PAINT, and focused efforts on the task of identifying a point to be used for PAINT.

The process of drawing the polygon identifies the leftmost coordinate (let's call that "a"), and the immediate neighbouring coordinates of "a".

Of the neighbouring coordinates, identify the topmost coordinate.  Let's call that "b".

Find the midpoint coordinate between a and b.  From there, go down one pixel, and go right one pixel.  PAINT at that spot.

Something like that.  I've put that code aside to review it again later after finishing up a "Rgba" set of library subroutines.  I figure when I look at the POLYGON code again later with fresh eyes and faint memory, I'll be in a better place to go "what the hell were you thinking?"
Reply


Messages In This Thread
RE: Trying to figure algorithm to draw and paint polygons - by CharlieJV - 09-01-2023, 09:52 PM



Users browsing this thread: 11 Guest(s)