< prev index next >
src/java.desktop/share/classes/sun/java2d/pipe/DrawImage.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2001, 2016, 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) 2001, 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
*** 172,182 ****
// Combine the scales and check if interpolation is necessary.
// Transform source bounds by extraAT,
// then translate the bounds again by x, y
// then transform the bounds again by sg.transform
! double coords[] = new double[] {
0, 0, imgw, imgh,
};
extraAT.transform(coords, 0, coords, 0, 2);
coords[0] += x;
coords[1] += y;
--- 172,182 ----
// Combine the scales and check if interpolation is necessary.
// Transform source bounds by extraAT,
// then translate the bounds again by x, y
// then transform the bounds again by sg.transform
! double[] coords = new double[] {
0, 0, imgw, imgh,
};
extraAT.transform(coords, 0, coords, 0, 2);
coords[0] += x;
coords[1] += y;
*** 239,249 ****
// simple scale or copy operation within the allowable
// error bounds.
// Note that we use (0,0,w,h) instead of (sx1,sy1,sx2,sy2)
// because the transform is already translated such that
// the origin is where sx1, sy1 should go.
! double coords[] = new double[6];
/* index: 0 1 2 3 4 5 */
/* coord: (0, 0), (w, h), (0, h) */
coords[2] = sx2 - sx1;
coords[3] = coords[5] = sy2 - sy1;
tx.transform(coords, 0, coords, 0, 3);
--- 239,249 ----
// simple scale or copy operation within the allowable
// error bounds.
// Note that we use (0,0,w,h) instead of (sx1,sy1,sx2,sy2)
// because the transform is already translated such that
// the origin is where sx1, sy1 should go.
! double[] coords = new double[6];
/* index: 0 1 2 3 4 5 */
/* coord: (0, 0), (w, h), (0, h) */
coords[2] = sx2 - sx1;
coords[3] = coords[5] = sy2 - sy1;
tx.transform(coords, 0, coords, 0, 3);
*** 274,284 ****
protected boolean tryCopyOrScale(SunGraphics2D sg,
Image img,
int sx1, int sy1,
int sx2, int sy2,
Color bgColor, int interpType,
! double coords[])
{
double dx1 = coords[0];
double dy1 = coords[1];
double dx2 = coords[2];
double dy2 = coords[3];
--- 274,284 ----
protected boolean tryCopyOrScale(SunGraphics2D sg,
Image img,
int sx1, int sy1,
int sx2, int sy2,
Color bgColor, int interpType,
! double[] coords)
{
double dx1 = coords[0];
double dy1 = coords[1];
double dx2 = coords[2];
double dy2 = coords[3];
< prev index next >