Lines Matching refs:data

125      * Use to build a SegmentPath.  This takes the data and preanalyzes it for
131 private double[] data;
151 if (data == null || datalen > data.length) {
152 data = new double[datalen];
154 data = null;
178 * Move to a new point. If there is no data, this will become the
179 * first point. If there is data, and the previous call was a lineTo, this
182 * segment. If there is data, and the previous call was a moveTo, this
193 * Connect to a new point. If there is no data, the previous point
216 if (data == null) {
217 data = new double[6];
226 data[w-3] = px = x;
227 data[w-2] = py = y;
231 // grow data to deal with new point
232 if (w == data.length) {
234 System.arraycopy(data, 0, t, 0, w);
235 data = t;
244 // update data
245 data[w++] = x;
246 data[w++] = y;
247 data[w++] = a;
267 if (data == null || w < 6) {
271 if (w == data.length) {
272 result = new SegmentPath(data, etype);
273 reset(0); // releases pointer to data
276 System.arraycopy(data, 0, dataToAdopt, 0, w);
278 reset(2); // reuses data, since we held on to it
309 * Note: We might want to cache more auxiliary data than the
313 private double[] data; // triplets x, y, a
324 SegmentPath(double[] data, EndType etype) {
325 this.data = data;
340 // data, such vectors start a new path segment).
400 double bx = data[0]; // previous point
401 double by = data[1];
402 double bl = data[2];
409 int ci = 0; // current best index into data
411 for (int i = 3; i < data.length; i += 3) {
412 double nx = data[i]; // current end point
413 double ny = data[i+1];
414 double nl = data[i+2];
428 int vi; // hold index of line, is data.length if last point on path
442 i == data.length - 3)) {
449 if (i == data.length - 3) {
453 vi = data.length;
478 bx = data[ci-3];
479 by = data[ci-2];
481 double nx = data[ci];
482 double ny = data[ci+1];
490 boolean havePrev = ci != 3 && data[ci-1] != data[ci-4];
491 boolean haveFoll = ci != data.length && data[ci-1] != data[ci+2];
492 boolean doExtend = etype.isExtended() && (ci == 3 || ci == data.length);
525 double bx = data[index-3];
526 double by = data[index-2];
529 double dx = data[index] - bx;
530 double dy = data[index+1] - by;
531 double l = data[index+2] - data[index - 1];
541 rx += data[index-1];
554 return data[2];
558 return data[data.length - 1];
562 return data[data.length-1] - data[2];
574 a -= data[2];
581 a += data[2];
589 * 3 and data.length-3 inclusive. It never points to a 'moveto' triple.
610 for (i = 5, lim = data.length-1; i < lim; i += 3) {
611 double v = data[i];
625 double dx = data[seg] - data[seg-3];
626 double dy = data[seg+1] - data[seg-2];
627 double dl = data[seg+2] - data[seg-1];
632 a -= data[seg-1];
634 pt.setLocation(data[seg-3] + a * ux - o * uy,
635 data[seg-2] + a * uy + o * ux);
733 double lo = data[ix-1];
734 double hi = data[ix+2];
740 if (ix == data.length - 3) hi = Double.POSITIVE_INFINITY;
756 final int ix; // index into data array for this segment
767 double len = data[ix+2] - data[ix-1];
768 this.ux = (data[ix] - data[ix-3]) / len;
769 this.uy = (data[ix+1] - data[ix-2]) / len;
798 temp.sx -= data[ix-1];
799 double sx = data[ix-3] + temp.sx * ux - temp.sy * uy;
800 double sy = data[ix-2] + temp.sx * uy + temp.sy * ux;
801 temp.lx -= data[ix-1];
802 double lx = data[ix-3] + temp.lx * ux - temp.ly * uy;
803 double ly = data[ix-2] + temp.lx * uy + temp.ly * ux;
828 final ArrayList<Segment> segments; // cache additional data on segments, working objects
836 for (int i = 3; i < data.length; i += 3) {
837 if (data[i+2] != data[i-1]) { // a new segment
937 for (int i = 0; i < data.length; i += 3) {
941 float x = ((int)(data[i] * 100))/100.0f;
942 float y = ((int)(data[i+1] * 100))/100.0f;
943 float l = ((int)(data[i+2] * 10))/10.0f;