< prev index next >
src/java.desktop/share/classes/java/awt/geom/FlatteningPathIterator.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2013, 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) 1997, 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
*** 43,53 ****
double squareflat; // Square of the flatness parameter
// for testing against squared lengths
int limit; // Maximum number of recursion levels
! double hold[] = new double[14]; // The cache of interpolated coords
// Note that this must be long enough
// to store a full cubic segment and
// a relative cubic segment to avoid
// aliasing when copying the coords
// of a curve to the end of the array.
--- 43,53 ----
double squareflat; // Square of the flatness parameter
// for testing against squared lengths
int limit; // Maximum number of recursion levels
! double[] hold = new double[14]; // The cache of interpolated coords
// Note that this must be long enough
// to store a full cubic segment and
// a relative cubic segment to avoid
// aliasing when copying the coords
// of a curve to the end of the array.
*** 69,79 ****
// that was last interpolated. This
// is the curve segment ready to be
// returned in the next call to
// currentSegment().
! int levels[]; // The recursion level at which
// each curve being held in storage
// was generated.
int levelIndex; // The index of the entry in the
// levels array of the curve segment
--- 69,79 ----
// that was last interpolated. This
// is the curve segment ready to be
// returned in the next call to
// currentSegment().
! int[] levels; // The recursion level at which
// each curve being held in storage
// was generated.
int levelIndex; // The index of the entry in the
// levels array of the curve segment
*** 173,183 ****
*/
void ensureHoldCapacity(int want) {
if (holdIndex - want < 0) {
int have = hold.length - holdIndex;
int newsize = hold.length + GROW_SIZE;
! double newhold[] = new double[newsize];
System.arraycopy(hold, holdIndex,
newhold, holdIndex + GROW_SIZE,
have);
hold = newhold;
holdIndex += GROW_SIZE;
--- 173,183 ----
*/
void ensureHoldCapacity(int want) {
if (holdIndex - want < 0) {
int have = hold.length - holdIndex;
int newsize = hold.length + GROW_SIZE;
! double[] newhold = new double[newsize];
System.arraycopy(hold, holdIndex,
newhold, holdIndex + GROW_SIZE,
have);
hold = newhold;
holdIndex += GROW_SIZE;
< prev index next >