Logo Search packages:      
Sourcecode: djvulibre version File versions

void DjVuImage::unmap ( GRect rect  )  const

unmaps the given rect# from unrotated document co-ordinates to rotated co-ordinates

Definition at line 1297 of file DjVuImage.cpp.

References GRectMapper::clear(), get_height(), get_real_height(), get_real_width(), get_rotate(), get_width(), GRectMapper::rotate(), GRectMapper::set_input(), GRectMapper::set_output(), and GRectMapper::unmap().

{
    GRect input, output;
    const int rotate_count=get_rotate(); 
    if(rotate_count%4)
    {  
        input = GRect(0,0,get_width(), get_height());
        output = GRect(0,0, get_real_width(), get_real_height());

        GRectMapper mapper;
        mapper.clear();
        mapper.set_input(input);
        mapper.set_output(output);               
        mapper.rotate((4-rotate_count)%4);
        mapper.unmap(rect);
    }
}


Generated by  Doxygen 1.6.0   Back to index