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

Method rotate

deps/tesseract/ccstruct/polyblk.cpp:185–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183 */
184
185void POLY_BLOCK::rotate(FCOORD rotation) {
186 FCOORD pos; //current pos;
187 ICOORDELT *pt; //current point
188 ICOORDELT_IT pts = &vertices; //iterator
189
190 do {
191 pt = pts.data ();
192 pos.set_x (pt->x ());
193 pos.set_y (pt->y ());
194 pos.rotate (rotation);
195 pt->set_x ((inT16) (floor (pos.x () + 0.5)));
196 pt->set_y ((inT16) (floor (pos.y () + 0.5)));
197 pts.forward ();
198 }
199 while (!pts.at_first ());
200 compute_bb();
201}
202
203/**
204 * @name POLY_BLOCK::reflect_in_y_axis

Callers

nothing calls this directly

Calls 7

dataMethod · 0.80
set_xMethod · 0.80
set_yMethod · 0.80
xMethod · 0.45
yMethod · 0.45
forwardMethod · 0.45
at_firstMethod · 0.45

Tested by

no test coverage detected