Draws the features in the given window.
| 64 | |
| 65 | // Draws the features in the given window. |
| 66 | void WordFeature::Draw(const GenericVector<WordFeature>& features, |
| 67 | ScrollView* window) { |
| 68 | #ifndef GRAPHICS_DISABLED |
| 69 | for (int f = 0; f < features.size(); ++f) { |
| 70 | FCOORD pos(features[f].x_, features[f].y_); |
| 71 | FCOORD dir; |
| 72 | dir.from_direction(features[f].dir_); |
| 73 | dir *= 8.0f; |
| 74 | window->SetCursor(IntCastRounded(pos.x() - dir.x()), |
| 75 | IntCastRounded(pos.y() - dir.y())); |
| 76 | window->DrawTo(IntCastRounded(pos.x() + dir.x()), |
| 77 | IntCastRounded(pos.y() + dir.y())); |
| 78 | } |
| 79 | #endif |
| 80 | } |
| 81 | |
| 82 | // Writes to the given file. Returns false in case of error. |
| 83 | bool WordFeature::Serialize(FILE* fp) const { |
nothing calls this directly
no test coverage detected