freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How can I detect start of polygon among outlines?


From: Ang Bodhi
Subject: How can I detect start of polygon among outlines?
Date: Sun, 02 Jul 2000 02:33:41 +0800

Hi FreeTypers,

I've wrote something to convert the TT font outlines into points for
vectorized drawing using Freetype2, now I would like to perform
tessellation on these points. To do tessellation I need to identify
the start of a polygon. Currently I assume each Move_To starts a
contour. If a contour goes in clockwise direction, it starts a
polygon. If the next contour goes in anti-clockwise direction, it
forms a hole inside the current polygon and so on. For example:

'C' is made up of one polygon with one contour.
'A' is made up of one polygon with two contours.
'B' is made up of one polygon with three contours.
'i' is made up of two polygon, each with one contour.
'%' is made up of one polygon with one contour, and
    two polygons with two contours each.

Is there a way to detect the start of a polygon easily/efficiently
instead of detecting clockwise vs anti-clockwise direction of the
contour points?

Regards,
Ang Bodhi





reply via email to

[Prev in Thread] Current Thread [Next in Thread]