Exemple #1
0
 void
 applyCustomFilter(PLBmp & theBitmap, const std::string & theFilterName, const VectorOfFloat & theFilterparams) {
     asl::Ptr<PLFilter> myPaintLibFilter = y60::PaintLibFilterFactory::get().createFilter(theFilterName,
                                                                                          theFilterparams);
     if (myPaintLibFilter) {
         theBitmap.ApplyFilter(*myPaintLibFilter);
     } else {
         ImageFilter myFilter = ImageFilter(getEnumFromString(theFilterName, ImageFilterStrings));
         applyCustomFilter(theBitmap, myFilter, theFilterparams);
     }
 }
Exemple #2
0
 void
 applyCustomFilter(PLBmp & theBitmap, ImageFilter theFilter, const std::vector<float> &  theFilterparams) {
     switch (theFilter) {
        /* case WINDOW_CW: {
             float myCenter = theFilterparams[0];
             float myWidth = theFilterparams[1];
             ApplyFilter(PLFilterWindowCW(myCenter, myWidth));
             break; }*/
         case HEIGHT_TO_NORMALMAP:
             theBitmap.ApplyFilter(HeightToNormalMap());
             break;
         default:
             break;
     }
 }