---------------------------------------------------------------------------*/ * This routine searches through the specified outline, computes * a slope for each vector in the outline, and marks each * vector as having one of the following directions: * N, S, E, W, NE, NW, SE, SW * This information is then stored in the outline and the * outline is returned. * @param Outline micro-feature
| 119 | * @note History: 7/21/89, DSJ, Created. |
| 120 | */ |
| 121 | void FindDirectionChanges(MFOUTLINE Outline, |
| 122 | FLOAT32 MinSlope, |
| 123 | FLOAT32 MaxSlope) { |
| 124 | MFEDGEPT *Current; |
| 125 | MFEDGEPT *Last; |
| 126 | MFOUTLINE EdgePoint; |
| 127 | |
| 128 | if (DegenerateOutline (Outline)) |
| 129 | return; |
| 130 | |
| 131 | Last = PointAt (Outline); |
| 132 | Outline = NextPointAfter (Outline); |
| 133 | EdgePoint = Outline; |
| 134 | do { |
| 135 | Current = PointAt (EdgePoint); |
| 136 | ComputeDirection(Last, Current, MinSlope, MaxSlope); |
| 137 | |
| 138 | Last = Current; |
| 139 | EdgePoint = NextPointAfter (EdgePoint); |
| 140 | } |
| 141 | while (EdgePoint != Outline); |
| 142 | |
| 143 | } /* FindDirectionChanges */ |
| 144 | |
| 145 | |
| 146 | /*---------------------------------------------------------------------------*/ |
no test coverage detected