'+---------------+---------------------------------------------------+
'| ###### ###### |     .--. .         .-.                            |
'| ##  ## ##   # |     |   )|        (   ) o                         |
'| ##  ##  ##    |     |--' |--. .-.  `-.  .  .-...--.--. .-.        |
'| ######   ##   |     |  \ |  |(   )(   ) | (   ||  |  |(   )       |
'| ##      ##    |     '   `'  `-`-'  `-'-' `-`-`|'  '  `-`-'`-      |
'| ##     ##   # |                            ._.'                   |
'| ##     ###### | Sources & Documents placed under the MIT License. |
'+---------------+---------------------------------------------------+
'|                                                                   |
'| === PolygonSupport.bm ===                                         |
'|                                                                   |
'| == This include file is part of the GuiTools Framework Project.   |
'| == It provides some useful SUBs/FUNCTIONs for Polygon handling.   |
'|                                                                   |
'+-------------------------------------------------------------------+
'| Done by RhoSigma, R.Heyder, provided AS IS, use at your own risk. |
'| Find me in the QB64 Forum or mail to support@rhosigma-cw.net for  |
'| any questions or suggestions. Thanx for your interest in my work. |
'+-------------------------------------------------------------------+

Polygon analysis, filling and alteration


The following functions are based on algorithms and code samples described by Darel Rex Finley under the "Geometry/Math" chapter on his web site http://alienryderflex.com/tutorials.shtml, go there to learn more about it. Note that in my implementation I've limited the polygon corner coordinates to integers, as this library is intended for drawing on screen, not for theoretical exact math.


Table of Contents

POLYGON FUNCTIONS

HELPER FUNCTIONS