/*
* 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.
*/
if (cm == cachedModel) {
{
return ras;
}
}
}
return cm.createCompatibleWritableRaster(w, h);
}
return;
}
return;
}
}
}
cachedModel = cm;
}
double x1;
double y1;
double dx;
double dy;
boolean cyclic;
int interp[];
// First calculate the distance moved in user space when
// we move a single unit along the X & Y axes in device space.
try {
} catch (NoninvertibleTransformException e) {
}
// Now calculate the (square of the) user space distance
// between the anchor points. This value equals:
// (UserVec . UserVec)
dx = 0;
dy = 0;
} else {
// Now calculate the proportional distance moved along the
// vector from p1 to p2 when we move a unit along X & Y in
// device space.
//
// The length of the projection of the Device Axis Vector is
// its dot product with the Unit User Vector:
// (DevAxisVec . (UserVec / Len(UserVec))
//
// The "proportional" length is that length divided again
// by the length of the User Vector:
// (DevAxisVec . (UserVec / Len(UserVec))) / Len(UserVec)
// which simplifies to:
// ((DevAxisVec . UserVec) / Len(UserVec)) / Len(UserVec)
// which simplifies to:
// (DevAxisVec . UserVec) / LenSquared(UserVec)
if (cyclic) {
} else {
// We are acyclic
if (dx < 0) {
// If we are using the acyclic form below, we need
// dx to be non-negative for simplicity of scanning
// across the scan lines for the transition points.
// values and swap the points and colors.
}
}
}
if (cm instanceof DirectColorModel) {
{
}
}
} else {
}
for (int i = 0; i <= 256; i++) {
float rel = i / 256.0f;
int rgb =
if (cyclic) {
}
}
}
/**
* Release the resources allocated for the operation.
*/
public void dispose() {
}
}
/**
* Return the ColorModel of the output.
*/
return model;
}
/**
* Return a Raster containing the colors generated for the graphics
* operation.
* @param x,y,w,h The area in device space for which colors are
* generated.
*/
}
if (cyclic) {
} else {
}
return rast;
}
while (--h >= 0) {
for (int j = w; j > 0; j--) {
}
}
}
while (--h >= 0) {
int j = w;
if (colrel <= 0.0) {
do {
}
}
if (j > 0) {
do {
} while (--j > 0);
}
}
}
}