mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
c5e0299c55
* implement most points for a adjustable image2leds mapping * implement new adjustable led mapping type
26 lines
671 B
C++
26 lines
671 B
C++
// Hyperion includes
|
|
#include <hyperion/ImageProcessorFactory.h>
|
|
#include <hyperion/ImageProcessor.h>
|
|
|
|
ImageProcessorFactory& ImageProcessorFactory::getInstance()
|
|
{
|
|
static ImageProcessorFactory instance;
|
|
// Return the singleton instance
|
|
return instance;
|
|
}
|
|
|
|
void ImageProcessorFactory::init(const LedString& ledString, const QJsonObject & blackborderConfig, int mappingType)
|
|
{
|
|
_ledString = ledString;
|
|
_blackborderConfig = blackborderConfig;
|
|
_mappingType = mappingType;
|
|
}
|
|
|
|
ImageProcessor* ImageProcessorFactory::newImageProcessor() const
|
|
{
|
|
ImageProcessor* ip = new ImageProcessor(_ledString, _blackborderConfig);
|
|
ip->setLedMappingType(_mappingType);
|
|
|
|
return ip;
|
|
}
|