MCPcopy Create free account
hub / github.com/creatale/node-dv / RenderIntFeature

Function RenderIntFeature

deps/tesseract/classify/intproto.cpp:1755–1773  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

1753 * @note History: Thu Mar 21 14:57:41 1991, DSJ, Created.
1754 */
1755void 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

Callers 5

DisplaySamplesMethod · 0.85
DebugDisplayMethod · 0.85
DisplayFeaturesMethod · 0.85
DisplayIntFeatureFunction · 0.85
blob_feature_displayMethod · 0.85

Calls 3

PenMethod · 0.80
SetCursorMethod · 0.80
DrawToMethod · 0.80

Tested by

no test coverage detected