mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
Original implementation of Alpha Image filters
Chromakey (to finish), lumakey and alpha fill.
This commit is contained in:
@@ -747,6 +747,22 @@ void SessionVisitor::visit (EdgeFilter& f)
|
||||
}
|
||||
}
|
||||
|
||||
void SessionVisitor::visit (AlphaFilter& f)
|
||||
{
|
||||
xmlCurrent_->SetAttribute("operation", (int) f.operation());
|
||||
|
||||
std::map< std::string, float > filter_params = f.program().parameters();
|
||||
XMLElement *parameters = xmlDoc_->NewElement( "parameters" );
|
||||
xmlCurrent_->InsertEndChild(parameters);
|
||||
for (auto p = filter_params.begin(); p != filter_params.end(); ++p)
|
||||
{
|
||||
XMLElement *param = xmlDoc_->NewElement( "uniform" );
|
||||
param->SetAttribute("name", p->first.c_str() );
|
||||
param->SetAttribute("value", p->second );
|
||||
parameters->InsertEndChild(param);
|
||||
}
|
||||
}
|
||||
|
||||
void SessionVisitor::visit (ImageFilter& f)
|
||||
{
|
||||
xmlCurrent_->SetAttribute("name", f.program().name().c_str() );
|
||||
|
||||
Reference in New Issue
Block a user