本文整理汇总了C++中mlt::Filter::get_double方法的典型用法代码示例。如果您正苦于以下问题:C++ Filter::get_double方法的具体用法?C++ Filter::get_double怎么用?C++ Filter::get_double使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mlt::Filter
的用法示例。
在下文中一共展示了Filter::get_double方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QWidget
Frei0rColoradjWidget::Frei0rColoradjWidget(Mlt::Filter filter, bool setDefaults, QWidget *parent) :
QWidget(parent),
ui(new Ui::Frei0rColoradjWidget),
m_filter(filter)
{
ui->setupUi(this);
ui->keepLumaCheckBox->hide();
m_defaultAction = 0.5;
m_defaultLuma = false;
m_defaultRGB = QColor::fromRgbF(0.5, 0.5, 0.5);
if (setDefaults) {
ui->modeComboBox->setCurrentIndex(2 * m_defaultAction);
ui->keepLumaCheckBox->setChecked(m_defaultLuma);
ui->wheel->setColor(m_defaultRGB);
m_filter.set(kParamAction, m_defaultAction);
m_filter.set(kParamKeepLuma, m_defaultLuma? 1 : 0);
m_filter.set(kParamRed, m_defaultRGB.redF());
m_filter.set(kParamGreen, m_defaultRGB.greenF());
m_filter.set(kParamBlue, m_defaultRGB.blueF());
ui->preset->saveDefaultPreset(m_filter);
} else {
ui->modeComboBox->setCurrentIndex(2 * filter.get_double(kParamAction));
ui->keepLumaCheckBox->setChecked(filter.get_int(kParamKeepLuma));
ui->wheel->setColor(QColor::fromRgbF(filter.get_double(kParamRed),
filter.get_double(kParamGreen),
filter.get_double(kParamBlue)));
}
ui->preset->loadPresets();
m_filter.set(kParamLumaFormula,
(MLT.profile().colorspace() == 709? kLumaFormula709 : kLumaFormula601));
}
示例2: f
MovitColorFilter::MovitColorFilter(Mlt::Filter filter, bool setDefaults, QWidget *parent) :
QWidget(parent),
ui(new Ui::MovitColorFilter),
m_filter(filter)
{
ui->setupUi(this);
Mlt::Filter f(MLT.profile(), "movit.lift_gamma_gain");
m_liftDefault = QColor::fromRgbF(f.get_double("lift_r"),
f.get_double("lift_g"),
f.get_double("lift_b"));
m_gammaDefault = QColor::fromRgbF(f.get_double("gamma_r") / GAMMA_FACTOR,
f.get_double("gamma_g") / GAMMA_FACTOR,
f.get_double("gamma_b") / GAMMA_FACTOR);
m_gainDefault = QColor::fromRgbF(f.get_double("gain_r") / GAIN_FACTOR,
f.get_double("gain_g") / GAIN_FACTOR,
f.get_double("gain_b") / GAIN_FACTOR);
if (setDefaults) {
ui->liftWheel->setColor(m_liftDefault);
ui->gammaWheel->setColor(m_gammaDefault);
ui->gainWheel->setColor(m_gainDefault);
ui->preset->saveDefaultPreset(m_filter);
} else {
ui->liftWheel->setColor(QColor::fromRgbF(filter.get_double("lift_r"),
filter.get_double("lift_g"),
filter.get_double("lift_b")));
ui->gammaWheel->setColor(QColor::fromRgbF(filter.get_double("gamma_r") / GAMMA_FACTOR,
filter.get_double("gamma_g") / GAMMA_FACTOR,
filter.get_double("gamma_b") / GAMMA_FACTOR));
ui->gainWheel->setColor(QColor::fromRgbF(filter.get_double("gain_r") / GAIN_FACTOR,
filter.get_double("gain_g") / GAIN_FACTOR,
filter.get_double("gain_b") / GAIN_FACTOR));
}
ui->preset->loadPresets();
}