@@ -0,0 +1,2535 @@
+/*%0A   Copyright (c) 2014 Ahome' Innovation Technologies. All rights reserved.%0A%0A   Licensed under the Apache License, Version 2.0 (the %22License%22);%0A   you may not use this file except in compliance with the License.%0A   You may obtain a copy of the License at%0A%0A       http://www.apache.org/licenses/LICENSE-2.0%0A%0A   Unless required by applicable law or agreed to in writing, software%0A   distributed under the License is distributed on an %22AS IS%22 BASIS,%0A   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A   See the License for the specific language governing permissions and%0A   limitations under the License.%0A */%0A%0Apackage com.ait.lienzo.client.core.image.filter;%0A%0Aimport com.ait.lienzo.client.core.Attribute;%0Aimport com.ait.lienzo.client.core.shape.json.validators.ValidationContext;%0Aimport com.ait.lienzo.client.core.shape.json.validators.ValidationException;%0Aimport com.ait.lienzo.client.core.types.ImageData;%0Aimport com.google.gwt.canvas.dom.client.CanvasPixelArray;%0Aimport com.google.gwt.json.client.JSONObject;%0A%0Apublic abstract class AbstractValueTransformImageDataFilter%3CT extends AbstractValueTransformImageDataFilter%3CT%3E%3E extends AbstractValueImageDataFilter%3CT%3E%0A%7B%0A    protected AbstractValueTransformImageDataFilter(double value)%0A    %7B%0A        super(value);%0A    %7D%0A%0A    protected AbstractValueTransformImageDataFilter(JSONObject node, ValidationContext ctx) throws ValidationException%0A    %7B%0A        super(node, ctx);%0A    %7D%0A%0A    @Override%0A    public ImageData filter(ImageData source, boolean copy)%0A    %7B%0A        if (null == source)%0A        %7B%0A            return null;%0A        %7D%0A        if (copy)%0A        %7B%0A            source = source.copy();%0A        %7D%0A        if (false == isActive())%0A        %7B%0A            return source;%0A        %7D%0A        final CanvasPixelArray data = source.getData();%0A%0A        if (null == data)%0A        %7B%0A            return source;%0A        %7D%0A        FilterCommonOps.doFilterTransform(data, getTransform(getValue()), source.getWidth(), source.getHeight());%0A%0A        return source;%0A    %7D%0A%0A    @Override%0A    public final boolean isTransforming()%0A    %7B%0A        return true;%0A    %7D%0A%0A    protected abstract FilterTransformFunction getTransform(double value);%0A%0A    protected static abstract class ValueTransformImageDataFilterFactory%3CT extends AbstractValueTransformImageDataFilter%3CT%3E%3E extends ImageDataFilterFactory%3CT%3E%0A    %7B%0A        protected ValueTransformImageDataFilterFactory(String type)%0A        %7B%0A            super(type);%0A%0A            addAttribute(Attribute.VALUE, true);%0A        %7D%0A    %7D%0A%7D%0A

add factory