/*
* 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.
*/
/*
* @author Charlton Innovations, Inc.
* @author Jim Graham
*/
/**
* CustomComponent, collection of GraphicsPrimitive
* Basically, this collection of components performs conversion from
* ANY to ANY via opaque copy
*/
public final class CustomComponent {
public static void register() {
// REMIND: This does not work for all destinations yet since
// the screen SurfaceData objects do not implement getRaster
GraphicsPrimitive[] primitives = {
};
}
int w, int h)
{
/*
* Intersect all of:
* - operation area (dstx, dsty, w, h)
* - destination bounds
* - (translated) src bounds
* - supplied clip (may be non-rectangular)
* Intersect the rectangular regions first since those are
* simpler operations.
*/
// srcxy in src space maps to dstxy in dst space
// Intersect with clip last since it may be non-rectangular
}
return ret;
}
}
/**
* ANY format to ARGB format Blit
*/
super(SurfaceType.Any,
}
{
// assert(icr.getPixelStride() == 1);
int span[] = new int[4];
}
}
}
// Pixels in the dest were modified directly, we must
// manually notify the raster that it was modified
// REMIND: We need to do something to make sure that dstRast
// is put back to the destination (as in the native Release
// function)
// src.releaseRaster(srcRast); // NOP?
// dst.releaseRaster(dstRast);
}
}
/**
* ARGB format to ANY format Blit
*/
super(SurfaceType.IntArgb,
}
{
// assert(icr.getPixelStride() == 1);
int span[] = new int[4];
}
}
}
// REMIND: We need to do something to make sure that dstRast
// is put back to the destination (as in the native Release
// function)
// src.releaseRaster(srcRast); // NOP?
// dst.releaseRaster(dstRast);
}
}
/**
* ARGB format to ANY format Blit (pixels are XORed together with XOR pixel)
*/
XorCopyArgbToAny() {
super(SurfaceType.IntArgb,
}
{
// assert(icr.getPixelStride() == 1);
int span[] = new int[4];
// REMIND: alpha bits of the destination pixel are
// currently altered by the XOR operation, but
// should be left untouched
switch (dstCM.getTransferType()) {
case DataBuffer.TYPE_BYTE:
byte[] bytesrcarr = (byte[]) srcPixel;
byte[] bytedstarr = (byte[]) dstPixel;
byte[] bytexorarr = (byte[]) xorPixel;
}
break;
case DataBuffer.TYPE_SHORT:
case DataBuffer.TYPE_USHORT:
short[] shortsrcarr = (short[]) srcPixel;
short[] shortdstarr = (short[]) dstPixel;
short[] shortxorarr = (short[]) xorPixel;
}
break;
case DataBuffer.TYPE_INT:
}
break;
case DataBuffer.TYPE_FLOAT:
float[] floatsrcarr = (float[]) srcPixel;
float[] floatdstarr = (float[]) dstPixel;
float[] floatxorarr = (float[]) xorPixel;
}
break;
case DataBuffer.TYPE_DOUBLE:
double[] doublesrcarr = (double[]) srcPixel;
double[] doubledstarr = (double[]) dstPixel;
double[] doublexorarr = (double[]) xorPixel;
}
break;
default:
throw new InternalError("Unsupported XOR pixel type");
}
}
}
}
// REMIND: We need to do something to make sure that dstRast
// is put back to the destination (as in the native Release
// function)
// src.releaseRaster(srcRast); // NOP?
// dst.releaseRaster(dstRast);
}
}