* This routine renders the specified feature into ShapeList. * @param window to add feature rendering to * @param Feature feature to be rendered * @param color color to use for feature rendering * @return New shape list with rendering of Feature added. * @note Globals: none * @note Exceptions: none * @note History: Thu Mar 21 14:57:41 1991, DSJ, Created. */
| 1753 | * @note History: Thu Mar 21 14:57:41 1991, DSJ, Created. |
| 1754 | */ |
| 1755 | void RenderIntFeature(ScrollView *window, const INT_FEATURE_STRUCT* Feature, |
| 1756 | ScrollView::Color color) { |
| 1757 | FLOAT32 X, Y, Dx, Dy, Length; |
| 1758 | |
| 1759 | window->Pen(color); |
| 1760 | assert(Feature != NULL); |
| 1761 | assert(color != 0); |
| 1762 | |
| 1763 | X = Feature->X; |
| 1764 | Y = Feature->Y; |
| 1765 | Length = GetPicoFeatureLength() * 0.7 * INT_CHAR_NORM_RANGE; |
| 1766 | // The -PI has no significant effect here, but the value of Theta is computed |
| 1767 | // using BinaryAnglePlusPi in intfx.cpp. |
| 1768 | Dx = (Length / 2.0) * cos((Feature->Theta / 256.0) * 2.0 * PI - PI); |
| 1769 | Dy = (Length / 2.0) * sin((Feature->Theta / 256.0) * 2.0 * PI - PI); |
| 1770 | |
| 1771 | window->SetCursor(X, Y); |
| 1772 | window->DrawTo(X + Dx, Y + Dy); |
| 1773 | } /* RenderIntFeature */ |
| 1774 | |
| 1775 | /** |
| 1776 | * This routine extracts the parameters of the specified |
no test coverage detected