Navigation
API > API/Plugins > API/Plugins/SVGImporter > API/Plugins/SVGImporter/FSVGImporterUtils
References
| Module | SVGImporter |
| Header | /Engine/Plugins/Experimental/SVGImporter/Source/SVGImporter/Public/SVGImporterUtils.h |
| Include | #include "SVGImporterUtils.h" |
| Source | /Engine/Plugins/Experimental/SVGImporter/Source/SVGImporter/Private/SVGImporterUtils.cpp |
static bool ShouldPolygonBeDrawn
(
const FSVGPathPolygon & ShapeToCheck,
const TArray < FSVGPathPolygon > & Polygons,
bool & bOutIsClockwise
)
Remarks
Evaluates if the specified ShapeToCheck is to be drawn or not (e.g. actual shape or hole to be cut) The value nonzero determines the "insideness" of a point in the shape by drawing a ray from that point to infinity in any direction, and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a path segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left. After counting the crossings, if the result is zero then the point is outside the path. Otherwise, it is inside.
See: https://developer.mozilla.org/en-US/docs/Web/Attribute/fill-rule
For now, this function is only considering the non-zero fill rule. todo: might need support for even odd fill rule.