polygons: Tag circular contours so they can be special-cased when drawing.
commitab26fd07724fe0e7dfc95fae3bdeb1ecfb8692e5
authorPeter Clifton <pcjc2@cam.ac.uk>
Sat, 14 Nov 2009 02:12:30 +0000 (14 02:12 +0000)
committerPeter Clifton <pcjc2@cam.ac.uk>
Sat, 14 Nov 2009 02:12:30 +0000 (14 02:12 +0000)
tree2039ae95c74a55fb22d95656289bb536ed229a2e
parent45c00744ccb2e7640d506529f80555ec08bdf053
polygons: Tag circular contours so they can be special-cased when drawing.

Tagging circular contours allows GUIs (if they wish) to draw circular
holes in polygons more accurately, and potentially faster - depending
on whether they use mask based rendering or rely on the dicer.

When zoomed far out (and using a mask based scheme), the drawing routine
can use a lower vertex count approximation to the contour - leading to
rendering speed improvements. This is used to reasonable effect in the
experimental OpenGL branch.

Modify hid/common/draw_helpers.c to use these tags when thin-drawing
polygon contours with common_thindraw_pcb_polygon(). This allows the
GUI to change the level of detail rendered with zoom, and serves to
test this feature.

DRC checking and output are still done using the fixed resolution
approximation present in the polygon contour, so in this respect -
it makes rendering somewhat unfaithful to the final output.
src/hid/common/draw_helpers.c
src/polyarea.h
src/polygon.c
src/polygon1.c