---------------------------------------------------------------------------*/ * This routine steps converts each section in the specified * outline to a feature described by its x,y position, length * and angle. * @param Outline outline to extract outline-features from * @param FeatureSet set of features to add outline-features to * @return none (results are returned in FeatureSet) * @note G
| 120 | * - 5/24/91, DSJ, Added hidden edge capability. |
| 121 | */ |
| 122 | void ConvertToOutlineFeatures(MFOUTLINE Outline, FEATURE_SET FeatureSet) { |
| 123 | MFOUTLINE Next; |
| 124 | MFOUTLINE First; |
| 125 | FPOINT FeatureStart; |
| 126 | FPOINT FeatureEnd; |
| 127 | |
| 128 | if (DegenerateOutline (Outline)) |
| 129 | return; |
| 130 | |
| 131 | First = Outline; |
| 132 | Next = First; |
| 133 | do { |
| 134 | FeatureStart = PointAt(Next)->Point; |
| 135 | Next = NextPointAfter(Next); |
| 136 | |
| 137 | /* note that an edge is hidden if the ending point of the edge is |
| 138 | marked as hidden. This situation happens because the order of |
| 139 | the outlines is reversed when they are converted from the old |
| 140 | format. In the old format, a hidden edge is marked by the |
| 141 | starting point for that edge. */ |
| 142 | if (!PointAt(Next)->Hidden) { |
| 143 | FeatureEnd = PointAt(Next)->Point; |
| 144 | AddOutlineFeatureToSet(&FeatureStart, &FeatureEnd, FeatureSet); |
| 145 | } |
| 146 | } |
| 147 | while (Next != First); |
| 148 | } /* ConvertToOutlineFeatures */ |
| 149 | |
| 150 | |
| 151 | /*---------------------------------------------------------------------------*/ |
no test coverage detected