src/share/classes/sun/font/StandardGlyphVector.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1998, 2005, 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) 1998, 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
*** 725,735 ****
StandardGlyphVector result = (StandardGlyphVector)super.clone();
result.clearCaches();
if (positions != null) {
! result.positions = (float[])positions.clone();
}
if (gti != null) {
result.gti = new GlyphTransformInfo(result, gti);
}
--- 725,735 ----
StandardGlyphVector result = (StandardGlyphVector)super.clone();
result.clearCaches();
if (positions != null) {
! result.positions = positions.clone();
}
if (gti != null) {
result.gti = new GlyphTransformInfo(result, gti);
}
*** 773,783 ****
int requiredLength = glyphs.length * 2 + 2;
if (srcPositions.length != requiredLength) {
throw new IllegalArgumentException("srcPositions.length != " + requiredLength);
}
! positions = (float[])srcPositions.clone();
clearCaches();
addFlags(FLAG_HAS_POSITION_ADJUSTMENTS);
}
--- 773,783 ----
int requiredLength = glyphs.length * 2 + 2;
if (srcPositions.length != requiredLength) {
throw new IllegalArgumentException("srcPositions.length != " + requiredLength);
}
! positions = srcPositions.clone();
clearCaches();
addFlags(FLAG_HAS_POSITION_ADJUSTMENTS);
}
*** 1389,1400 ****
// used when cloning a glyph vector, need to set back link
GlyphTransformInfo(StandardGlyphVector sgv, GlyphTransformInfo rhs) {
this.sgv = sgv;
! this.indices = rhs.indices == null ? null : (int[])rhs.indices.clone();
! this.transforms = rhs.transforms == null ? null : (double[])rhs.transforms.clone();
this.strikesRef = null; // can't share cache, so rather than clone, we just null out
}
// used in sgv equality
public boolean equals(GlyphTransformInfo rhs) {
--- 1389,1400 ----
// used when cloning a glyph vector, need to set back link
GlyphTransformInfo(StandardGlyphVector sgv, GlyphTransformInfo rhs) {
this.sgv = sgv;
! this.indices = rhs.indices == null ? null : rhs.indices.clone();
! this.transforms = rhs.transforms == null ? null : rhs.transforms.clone();
this.strikesRef = null; // can't share cache, so rather than clone, we just null out
}
// used in sgv equality
public boolean equals(GlyphTransformInfo rhs) {