Exemple #1
0
    bool AlphaBlendingAutoTest(const FuncAB & f1, const FuncAB & f2)
    {
        bool result = true;

        for(View::Format format = View::Gray8; format <= View::Bgra32; format = View::Format(format + 1))
        {
            FuncAB f1c = FuncAB(f1.func, f1.description + ColorDescription(format));
            FuncAB f2c = FuncAB(f2.func, f2.description + ColorDescription(format));
            
            result = result && AlphaBlendingAutoTest(format, W, H, f1c, f2c);
            result = result && AlphaBlendingAutoTest(format, W + O, H - O, f1c, f2c);
            result = result && AlphaBlendingAutoTest(format, W - O, H + O, f1c, f2c);
        }

        return result;
    }
Exemple #2
0
    bool IntegralAutoTest(View::Format sumFormat, View::Format sqsumFormat, const Func & f1, const Func & f2)
    {
        bool result = true;

        for(int sqsumEnable = 0; sqsumEnable <= 1; ++sqsumEnable)
        {
            for(int tiltedEnable = 0; tiltedEnable <= 1; ++tiltedEnable)
            {
                std::stringstream ss;
                ss << ColorDescription(sumFormat) + ColorDescription(sqsumFormat);
                ss << "<1" << sqsumEnable << tiltedEnable << ">";

                Func f1d = Func(f1.func, f1.description + ss.str());
                Func f2d = Func(f2.func, f2.description + ss.str());
                result = result && IntegralAutoTest(W, H, sqsumEnable != 0, tiltedEnable != 0, sumFormat, sqsumFormat, f1d, f2d);
                result = result && IntegralAutoTest(W + O, H - O, sqsumEnable != 0, tiltedEnable != 0, sumFormat, sqsumFormat, f1d, f2d);
                result = result && IntegralAutoTest(W - O, H + O, sqsumEnable != 0, tiltedEnable != 0, sumFormat, sqsumFormat, f1d, f2d);
            }
        }

        return result;
    }