本文整理汇总了C++中Params::colorParams方法的典型用法代码示例。如果您正苦于以下问题:C++ Params::colorParams方法的具体用法?C++ Params::colorParams怎么用?C++ Params::colorParams使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Params
的用法示例。
在下文中一共展示了Params::colorParams方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: out_file_path
void
CacheDrivenTask::process(
PageInfo const& page_info, AbstractFilterDataCollector* collector,
ImageTransformation const& xform, QPolygonF const& content_rect_phys)
{
if (ThumbnailCollector* thumb_col = dynamic_cast<ThumbnailCollector*>(collector)) {
QString const out_file_path(m_outFileNameGen.filePathFor(page_info.id()));
Params const params(m_ptrSettings->getParams(page_info.id()));
ImageTransformation new_xform(xform);
new_xform.postScaleToDpi(params.outputDpi());
bool need_reprocess = false;
do { // Just to be able to break from it.
std::auto_ptr<OutputParams> stored_output_params(
m_ptrSettings->getOutputParams(page_info.id())
);
if (!stored_output_params.get()) {
need_reprocess = true;
break;
}
OutputGenerator const generator(
params.outputDpi(), params.colorParams(), params.despeckleLevel(),
new_xform, content_rect_phys
);
OutputImageParams const new_output_image_params(
generator.outputImageSize(), generator.outputContentRect(),
new_xform, params.outputDpi(), params.colorParams(),
params.dewarpingMode(), params.distortionModel(),
params.depthPerception(), params.despeckleLevel()
);
if (!stored_output_params->outputImageParams().matches(new_output_image_params)) {
need_reprocess = true;
break;
}
ZoneSet const new_picture_zones(m_ptrSettings->pictureZonesForPage(page_info.id()));
if (!PictureZoneComparator::equal(stored_output_params->pictureZones(), new_picture_zones)) {
need_reprocess = true;
break;
}
ZoneSet const new_fill_zones(m_ptrSettings->fillZonesForPage(page_info.id()));
if (!FillZoneComparator::equal(stored_output_params->fillZones(), new_fill_zones)) {
need_reprocess = true;
break;
}
QFileInfo const out_file_info(out_file_path);
if (!out_file_info.exists()) {
need_reprocess = true;
break;
}
if (!stored_output_params->outputFileParams().matches(OutputFileParams(out_file_info))) {
need_reprocess = true;
break;
}
} while (false);
if (need_reprocess) {
thumb_col->processThumbnail(
std::auto_ptr<QGraphicsItem>(
new IncompleteThumbnail(
thumb_col->thumbnailCache(),
thumb_col->maxLogicalThumbSize(),
page_info.imageId(), new_xform
)
)
);
} else {
ImageTransformation const out_xform(
new_xform.resultingRect(), params.outputDpi()
);
thumb_col->processThumbnail(
std::auto_ptr<QGraphicsItem>(
new Thumbnail(
thumb_col->thumbnailCache(),
thumb_col->maxLogicalThumbSize(),
ImageId(out_file_path), out_xform
)
)
);
}
}
}
示例2: params
FilterResultPtr
Task::process(
TaskStatus const& status, FilterData const& data,
QPolygonF const& content_rect_phys, QPolygonF const& page_rect_phys)
{
status.throwIfCancelled();
Params const params(m_ptrSettings->getParams(m_pageId));
RenderParams const render_params(params.colorParams());
QString const out_file_path(m_outFileNameGen.filePathFor(m_pageId));
QFileInfo const out_file_info(out_file_path);
QString const automask_dir(Utils::automaskDir(m_outFileNameGen.outDir()));
QString const automask_file_path(
QDir(automask_dir).absoluteFilePath(out_file_info.fileName())
);
QFileInfo automask_file_info(automask_file_path);
QString const speckles_dir(Utils::specklesDir(m_outFileNameGen.outDir()));
QString const speckles_file_path(
QDir(speckles_dir).absoluteFilePath(out_file_info.fileName())
);
QFileInfo speckles_file_info(speckles_file_path);
bool const need_picture_editor = render_params.mixedOutput() && !m_batchProcessing;
bool const need_speckles_image = params.despeckleLevel() != DESPECKLE_OFF
&& params.colorParams().colorMode() != ColorParams::COLOR_GRAYSCALE && !m_batchProcessing;
OutputGenerator const generator(
params.outputDpi(), params.colorParams(), params.despeckleLevel(),
data.xform(), content_rect_phys, page_rect_phys
);
OutputImageParams const new_output_image_params(
generator.outputImageSize(), generator.outputContentRect(),
data.xform(), params.outputDpi(), params.colorParams(),
params.dewarpingMode(), params.distortionModel(),
params.depthPerception(), params.despeckleLevel()
);
ZoneSet const new_picture_zones(m_ptrSettings->pictureZonesForPage(m_pageId));
ZoneSet const new_fill_zones(m_ptrSettings->fillZonesForPage(m_pageId));
bool need_reprocess = false;
do { // Just to be able to break from it.
std::auto_ptr<OutputParams> stored_output_params(
m_ptrSettings->getOutputParams(m_pageId)
);
if (!stored_output_params.get()) {
need_reprocess = true;
break;
}
if (!stored_output_params->outputImageParams().matches(new_output_image_params)) {
need_reprocess = true;
break;
}
if (!PictureZoneComparator::equal(stored_output_params->pictureZones(), new_picture_zones)) {
need_reprocess = true;
break;
}
if (!FillZoneComparator::equal(stored_output_params->fillZones(), new_fill_zones)) {
need_reprocess = true;
break;
}
if (!out_file_info.exists()) {
need_reprocess = true;
break;
}
if (!stored_output_params->outputFileParams().matches(OutputFileParams(out_file_info))) {
need_reprocess = true;
break;
}
if (need_picture_editor) {
if (!automask_file_info.exists()) {
need_reprocess = true;
break;
}
if (!stored_output_params->automaskFileParams().matches(OutputFileParams(automask_file_info))) {
need_reprocess = true;
break;
}
}
if (need_speckles_image) {
if (!speckles_file_info.exists()) {
need_reprocess = true;
break;
}
if (!stored_output_params->specklesFileParams().matches(OutputFileParams(speckles_file_info))) {
need_reprocess = true;
break;
//.........这里部分代码省略.........