< prev index next >
src/java.desktop/share/classes/java/awt/image/ReplicateScaleFilter.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 72,88 ****
/**
* An {@code int} array containing information about a
* row of pixels.
*/
! protected int srcrows[];
/**
* An {@code int} array containing information about a
* column of pixels.
*/
! protected int srccols[];
/**
* A {@code byte} array initialized with a size of
* {@link #destWidth} and used to deliver a row of pixel
* data to the {@link ImageConsumer}.
--- 72,88 ----
/**
* An {@code int} array containing information about a
* row of pixels.
*/
! protected int[] srcrows;
/**
* An {@code int} array containing information about a
* column of pixels.
*/
! protected int[] srccols;
/**
* A {@code byte} array initialized with a size of
* {@link #destWidth} and used to deliver a row of pixel
* data to the {@link ImageConsumer}.
*** 183,201 ****
* this class to filter pixels from an image should avoid calling
* this method directly since that operation could interfere
* with the filtering operation.
*/
public void setPixels(int x, int y, int w, int h,
! ColorModel model, byte pixels[], int off,
int scansize) {
if (srcrows == null || srccols == null) {
calculateMaps();
}
int sx, sy;
int dx1 = (2 * x * destWidth + srcWidth - 1) / (2 * srcWidth);
int dy1 = (2 * y * destHeight + srcHeight - 1) / (2 * srcHeight);
! byte outpix[];
if (outpixbuf != null && outpixbuf instanceof byte[]) {
outpix = (byte[]) outpixbuf;
} else {
outpix = new byte[destWidth];
outpixbuf = outpix;
--- 183,201 ----
* this class to filter pixels from an image should avoid calling
* this method directly since that operation could interfere
* with the filtering operation.
*/
public void setPixels(int x, int y, int w, int h,
! ColorModel model, byte[] pixels, int off,
int scansize) {
if (srcrows == null || srccols == null) {
calculateMaps();
}
int sx, sy;
int dx1 = (2 * x * destWidth + srcWidth - 1) / (2 * srcWidth);
int dy1 = (2 * y * destHeight + srcHeight - 1) / (2 * srcHeight);
! byte[] outpix;
if (outpixbuf != null && outpixbuf instanceof byte[]) {
outpix = (byte[]) outpixbuf;
} else {
outpix = new byte[destWidth];
outpixbuf = outpix;
*** 224,242 ****
* this class to filter pixels from an image should avoid calling
* this method directly since that operation could interfere
* with the filtering operation.
*/
public void setPixels(int x, int y, int w, int h,
! ColorModel model, int pixels[], int off,
int scansize) {
if (srcrows == null || srccols == null) {
calculateMaps();
}
int sx, sy;
int dx1 = (2 * x * destWidth + srcWidth - 1) / (2 * srcWidth);
int dy1 = (2 * y * destHeight + srcHeight - 1) / (2 * srcHeight);
! int outpix[];
if (outpixbuf != null && outpixbuf instanceof int[]) {
outpix = (int[]) outpixbuf;
} else {
outpix = new int[destWidth];
outpixbuf = outpix;
--- 224,242 ----
* this class to filter pixels from an image should avoid calling
* this method directly since that operation could interfere
* with the filtering operation.
*/
public void setPixels(int x, int y, int w, int h,
! ColorModel model, int[] pixels, int off,
int scansize) {
if (srcrows == null || srccols == null) {
calculateMaps();
}
int sx, sy;
int dx1 = (2 * x * destWidth + srcWidth - 1) / (2 * srcWidth);
int dy1 = (2 * y * destHeight + srcHeight - 1) / (2 * srcHeight);
! int[] outpix;
if (outpixbuf != null && outpixbuf instanceof int[]) {
outpix = (int[]) outpixbuf;
} else {
outpix = new int[destWidth];
outpixbuf = outpix;
< prev index next >