Scales by the given factor in place.
| 200 | |
| 201 | // Scales by the given factor in place. |
| 202 | void TESSLINE::Scale(float factor) { |
| 203 | EDGEPT* pt = loop; |
| 204 | do { |
| 205 | pt->pos.x = static_cast<int>(floor(pt->pos.x * factor + 0.5)); |
| 206 | pt->pos.y = static_cast<int>(floor(pt->pos.y * factor + 0.5)); |
| 207 | pt = pt->next; |
| 208 | } while (pt != loop); |
| 209 | SetupFromPos(); |
| 210 | } |
| 211 | |
| 212 | // Sets up the start and vec members of the loop from the pos members. |
| 213 | void TESSLINE::SetupFromPos() { |