当前位置: 首页>>代码示例>>C++>>正文


C++ BLOBNBOX_IT::move_to_last方法代码示例

本文整理汇总了C++中BLOBNBOX_IT::move_to_last方法的典型用法代码示例。如果您正苦于以下问题:C++ BLOBNBOX_IT::move_to_last方法的具体用法?C++ BLOBNBOX_IT::move_to_last怎么用?C++ BLOBNBOX_IT::move_to_last使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BLOBNBOX_IT的用法示例。


在下文中一共展示了BLOBNBOX_IT::move_to_last方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: plot_to_row

void plot_to_row(                 //draw a row
        TO_ROW *row,     //row to draw
        ScrollView::Color colour,   //colour to draw in
        FCOORD rotation  //rotation for line
) {
    FCOORD plot_pt;                //point to plot
    //blobs
    BLOBNBOX_IT it = row->blob_list();
    float left, right;             //end of row

    if (it.empty()) {
        tprintf("No blobs in row at %g\n", row->parallel_c());
        return;
    }
    left = it.data()->bounding_box().left();
    it.move_to_last();
    right = it.data()->bounding_box().right();
    plot_blob_list(to_win, row->blob_list(), colour, ScrollView::BROWN);
    to_win->Pen(colour);
    plot_pt = FCOORD(left, row->line_m() * left + row->line_c());
    plot_pt.rotate(rotation);
    to_win->SetCursor(plot_pt.x(), plot_pt.y());
    plot_pt = FCOORD(right, row->line_m() * right + row->line_c());
    plot_pt.rotate(rotation);
    to_win->DrawTo(plot_pt.x(), plot_pt.y());
}
开发者ID:mehulsbhatt,项目名称:MyOCRTEST,代码行数:26,代码来源:drawtord.cpp

示例2: plot_parallel_row

void plot_parallel_row(                 //draw a row
        TO_ROW *row,     //row to draw
        float gradient,  //gradients of lines
        inT32 left,      //edge of block
        ScrollView::Color colour,   //colour to draw in
        FCOORD rotation  //rotation for line
) {
    FCOORD plot_pt;                //point to plot
    //blobs
    BLOBNBOX_IT it = row->blob_list();
    float fleft = (float) left;    //floating version
    float right;                   //end of row

    //      left=it.data()->bounding_box().left();
    it.move_to_last();
    right = it.data()->bounding_box().right();
    plot_blob_list(to_win, row->blob_list(), colour, ScrollView::BROWN);
    to_win->Pen(colour);
    plot_pt = FCOORD(fleft, gradient * left + row->max_y());
    plot_pt.rotate(rotation);
    to_win->SetCursor(plot_pt.x(), plot_pt.y());
    plot_pt = FCOORD(fleft, gradient * left + row->min_y());
    plot_pt.rotate(rotation);
    to_win->DrawTo(plot_pt.x(), plot_pt.y());
    plot_pt = FCOORD(fleft, gradient * left + row->parallel_c());
    plot_pt.rotate(rotation);
    to_win->SetCursor(plot_pt.x(), plot_pt.y());
    plot_pt = FCOORD(right, gradient * right + row->parallel_c());
    plot_pt.rotate(rotation);
    to_win->DrawTo(plot_pt.x(), plot_pt.y());
}
开发者ID:mehulsbhatt,项目名称:MyOCRTEST,代码行数:31,代码来源:drawtord.cpp


注:本文中的BLOBNBOX_IT::move_to_last方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。