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

Method Scale

deps/tesseract/ccstruct/blobs.cpp:202–210  ·  view source on GitHub ↗

Scales by the given factor in place.

Source from the content-addressed store, hash-verified

200
201// Scales by the given factor in place.
202void 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.
213void TESSLINE::SetupFromPos() {

Callers 1

LocalNormBlobMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected