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

Function ClearFeatureSpaceWindow

deps/tesseract/classify/intproto.cpp:1095–1114  ·  view source on GitHub ↗

Clears the given window and draws the featurespace guides for the appropriate normalization method.

Source from the content-addressed store, hash-verified

1093/// Clears the given window and draws the featurespace guides for the
1094/// appropriate normalization method.
1095void ClearFeatureSpaceWindow(NORM_METHOD norm_method, ScrollView* window) {
1096 window->Clear();
1097
1098 window->Pen(ScrollView::GREY);
1099 // Draw the feature space limit rectangle.
1100 window->Rectangle(0, 0, INT_MAX_X, INT_MAX_Y);
1101 if (norm_method == baseline) {
1102 window->SetCursor(0, INT_DESCENDER);
1103 window->DrawTo(INT_MAX_X, INT_DESCENDER);
1104 window->SetCursor(0, INT_BASELINE);
1105 window->DrawTo(INT_MAX_X, INT_BASELINE);
1106 window->SetCursor(0, INT_XHEIGHT);
1107 window->DrawTo(INT_MAX_X, INT_XHEIGHT);
1108 window->SetCursor(0, INT_CAPHEIGHT);
1109 window->DrawTo(INT_MAX_X, INT_CAPHEIGHT);
1110 } else {
1111 window->Rectangle(INT_XCENTER - INT_XRADIUS, INT_YCENTER - INT_YRADIUS,
1112 INT_XCENTER + INT_XRADIUS, INT_YCENTER + INT_YRADIUS);
1113 }
1114}
1115#endif
1116
1117/**

Callers 3

DisplaySamplesMethod · 0.85
ShowMatchDisplayMethod · 0.85
blob_feature_displayMethod · 0.85

Calls 5

PenMethod · 0.80
RectangleMethod · 0.80
SetCursorMethod · 0.80
DrawToMethod · 0.80
ClearMethod · 0.45

Tested by

no test coverage detected