本文整理汇总了C++中PaintLayer::paintLayer方法的典型用法代码示例。如果您正苦于以下问题:C++ PaintLayer::paintLayer方法的具体用法?C++ PaintLayer::paintLayer怎么用?C++ PaintLayer::paintLayer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PaintLayer
的用法示例。
在下文中一共展示了PaintLayer::paintLayer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QRect
Kross::Api::Object::Ptr Filter::process(Kross::Api::List::Ptr args)
{
PaintLayer* src = (PaintLayer*)args->item(0).data();
if(!m_filter->workWith( src->paintLayer()->paintDevice()->colorSpace()))
{
throw Kross::Api::Exception::Ptr( new Kross::Api::Exception( i18n("An error has occured in %1").arg("process") ) );
}
QRect rect;
if( args->count() >1)
{
uint x = Kross::Api::Variant::toVariant(args->item(1)).toUInt();
uint y = Kross::Api::Variant::toVariant(args->item(2)).toUInt();
uint w = Kross::Api::Variant::toVariant(args->item(3)).toUInt();
uint h = Kross::Api::Variant::toVariant(args->item(4)).toUInt();
rect = QRect(x, y, w, h);
} else {
QRect r1 = src->paintLayer()->paintDevice()->extent();
QRect r2 = src->paintLayer()->image()->bounds();
rect = r1.intersect(r2);
}
m_filter->process( src->paintLayer()->paintDevice(), src->paintLayer()->paintDevice(), m_config->filterConfiguration(), rect );
return 0;
}