< prev index next >
src/java.desktop/share/classes/sun/java2d/loops/DrawGlyphListAA.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2000, 2004, 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) 2000, 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
*** 102,112 ****
int cy1 = clip.getLoY();
int cx2 = clip.getHiX();
int cy2 = clip.getHiY();
for (int i = 0; i < num; i++) {
gl.setGlyphIndex(i);
! int metrics[] = gl.getMetrics();
int gx1 = metrics[0];
int gy1 = metrics[1];
int w = metrics[2];
int gx2 = gx1 + w;
int gy2 = gy1 + metrics[3];
--- 102,112 ----
int cy1 = clip.getLoY();
int cx2 = clip.getHiX();
int cy2 = clip.getHiY();
for (int i = 0; i < num; i++) {
gl.setGlyphIndex(i);
! int[] metrics = gl.getMetrics();
int gx1 = metrics[0];
int gy1 = metrics[1];
int w = metrics[2];
int gx2 = gx1 + w;
int gy2 = gy1 + metrics[3];
*** 120,130 ****
gy1 = cy1;
}
if (gx2 > cx2) gx2 = cx2;
if (gy2 > cy2) gy2 = cy2;
if (gx2 > gx1 && gy2 > gy1) {
! byte alpha[] = gl.getGrayBits();
maskop.MaskFill(sg2d, dest, sg2d.composite,
gx1, gy1, gx2 - gx1, gy2 - gy1,
alpha, off, w);
}
}
--- 120,130 ----
gy1 = cy1;
}
if (gx2 > cx2) gx2 = cx2;
if (gy2 > cy2) gy2 = cy2;
if (gx2 > gx1 && gy2 > gy1) {
! byte[] alpha = gl.getGrayBits();
maskop.MaskFill(sg2d, dest, sg2d.composite,
gx1, gy1, gx2 - gx1, gy2 - gy1,
alpha, off, w);
}
}
< prev index next >