示例#1
0
void wxDFBDCImpl::DoSetDeviceClippingRegion(const wxRegion& region)
{
    // NB: this can be done because wxDFB only supports rectangular regions
    wxRect rect = region.AsRect();

    // our parameter is in physical coordinates while DoSetClippingRegion()
    // takes logical ones
    rect.x = XDEV2LOG(rect.x);
    rect.y = YDEV2LOG(rect.y);
    rect.width = XDEV2LOG(rect.width);
    rect.height = YDEV2LOG(rect.height);

    DoSetClippingRegion(rect.x, rect.y, rect.width, rect.height);
}
示例#2
0
文件: dc.cpp 项目: hgwells/tive
void wxDC::DoSetClippingRegionAsRegion(const wxRegion& region)
{
    // NB: this can be done because wxDFB only supports rectangular regions
    SetClippingRegion(region.AsRect());
}