Normalize a blob using blob transformations. Less accurate, but more accurately copies the old way.
| 409 | // Normalize a blob using blob transformations. Less accurate, but |
| 410 | // more accurately copies the old way. |
| 411 | void DENORM::LocalNormBlob(TBLOB* blob) const { |
| 412 | TBOX blob_box = blob->bounding_box(); |
| 413 | ICOORD translation(-IntCastRounded(x_origin_), -IntCastRounded(y_origin_)); |
| 414 | blob->Move(translation); |
| 415 | if (y_scale_ != 1.0f) |
| 416 | blob->Scale(y_scale_); |
| 417 | if (rotation_ != NULL) |
| 418 | blob->Rotate(*rotation_); |
| 419 | translation.set_x(IntCastRounded(final_xshift_)); |
| 420 | translation.set_y(IntCastRounded(final_yshift_)); |
| 421 | blob->Move(translation); |
| 422 | } |
| 423 | |
| 424 | // Fills in the x-height range accepted by the given unichar_id, given its |
| 425 | // bounding box in the usual baseline-normalized coordinates, with some |
no test coverage detected