/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* InnerShadowEffect - This effect currently only works with ARGB type buffered
* images.
*
* @author Created by Jasper Potts (Jun 18, 2007)
*/
// =================================================================================================================
// Effect Methods
/**
* Get the type of this effect, one of UNDER,BLENDED,OVER. UNDER means the result of apply effect should be painted
* under the src image. BLENDED means the result of apply sffect contains a modified src image so just it should be
* painted. OVER means the result of apply effect should be painted over the src image.
*
* @return The effect type
*/
}
/**
* Apply the effect to the src image generating the result . The result image may or may not contain the source
* image depending on what the effect type is.
*
* @param src The source image for applying the effect to
* @param dst The dstination image to paint effect result into. If this is null then a new image will be created
* @param w The width of the src image to apply effect to, this allow the src and dst buffers to be bigger than
* the area the need effect applied to it
* @param h The height of the src image to apply effect to, this allow the src and dst buffers to be bigger than
* the area the need effect applied to it
* @return Image with the result of the effect
*/
throw new IllegalArgumentException("Effect only works with " +
"source images of type BufferedImage.TYPE_INT_ARGB.");
}
throw new IllegalArgumentException("Effect only works with " +
"destination images of type BufferedImage.TYPE_INT_ARGB.");
}
// calculate offset
// clac expanded size
// create tmp buffers
// extract src image alpha channel and inverse and offset
for (int y = 0; y < h; y++) {
for (int x = 0; x < w; x++) {
}
}
// blur
//rescale
}
// create color image with shadow color and greyscale image as alpha
for (int y = 0; y < h; y++) {
for (int x = 0; x < w; x++) {
}
}
return dst;
}
}