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

Method Rotate

deps/tesseract/ccstruct/blobs.cpp:177–188  ·  view source on GitHub ↗

Rotates by the given rotation in place.

Source from the content-addressed store, hash-verified

175
176// Rotates by the given rotation in place.
177void TESSLINE::Rotate(const FCOORD rot) {
178 EDGEPT* pt = loop;
179 do {
180 int tmp = static_cast<int>(floor(pt->pos.x * rot.x() -
181 pt->pos.y * rot.y() + 0.5));
182 pt->pos.y = static_cast<int>(floor(pt->pos.y * rot.x() +
183 pt->pos.x * rot.y() + 0.5));
184 pt->pos.x = tmp;
185 pt = pt->next;
186 } while (pt != loop);
187 SetupFromPos();
188}
189
190// Moves by the given vec in place.
191void TESSLINE::Move(const ICOORD vec) {

Callers 1

LocalNormBlobMethod · 0.45

Calls 2

xMethod · 0.45
yMethod · 0.45

Tested by

no test coverage detected