int[] computePolyline(int left, int top, int right, int bottom) { int height = bottom - top; // can be any number int width = 2 * height; // must be even int peaks = Compatibility.ceil(right - left, width); if (peaks == 0 && right - left > 2) { peaks = 1; } int length = ((2 * peaks) + 1) * 2; if (length < 0) return new int[0]; int[] coordinates = new int[length]; for (int i = 0; i < peaks; i++) { int index = 4 * i; coordinates[index] = left + (width * i); coordinates[index+1] = bottom; coordinates[index+2] = coordinates[index] + width / 2; coordinates[index+3] = top; } coordinates[length-2] = left + (width * peaks); coordinates[length-1] = bottom; return coordinates; }
int[] computePolyline(int left, int top, int right, int bottom) { int height = bottom - top; // can be any number int width = 2 * height; // must be even int peaks = Compatibility.ceil(right - left, width); if (peaks == 0 && right - left > 2) { peaks = 1; } int length = ((2 * peaks) + 1) * 2; if (length < 0) return new int[0]; int[] coordinates = new int[length]; for (int i = 0; i < peaks; i++) { int index = 4 * i; coordinates[index] = left + (width * i); coordinates[index+1] = bottom; coordinates[index+2] = coordinates[index] + width / 2; coordinates[index+3] = top; } coordinates[length-2] = left + (width * peaks); coordinates[length-1] = bottom; return coordinates; }
int[] computePolyline(int left, int top, int right, int bottom) { int height = bottom - top; // can be any number int width = 2 * height; // must be even int peaks = Compatibility.ceil(right - left, width); if (peaks == 0 && right - left > 2) { peaks = 1; } int length = ((2 * peaks) + 1) * 2; if (length < 0) return new int[0]; int[] coordinates = new int[length]; for (int i = 0; i < peaks; i++) { int index = 4 * i; coordinates[index] = left + (width * i); coordinates[index+1] = bottom; coordinates[index+2] = coordinates[index] + width / 2; coordinates[index+3] = top; } coordinates[length-2] = left + (width * peaks); coordinates[length-1] = bottom; return coordinates; }
int[] computePolyline(int left, int top, int right, int bottom) { int height = bottom - top; // can be any number int width = 2 * height; // must be even int peaks = Compatibility.ceil(right - left, width); if (peaks == 0 && right - left > 2) { peaks = 1; } int length = ((2 * peaks) + 1) * 2; if (length < 0) return new int[0]; int[] coordinates = new int[length]; for (int i = 0; i < peaks; i++) { int index = 4 * i; coordinates[index] = left + (width * i); coordinates[index+1] = bottom; coordinates[index+2] = coordinates[index] + width / 2; coordinates[index+3] = top; } coordinates[length-2] = left + (width * peaks); coordinates[length-1] = bottom; return coordinates; }
float[] computePolyline(int left, int top, int right, int bottom) { int height = bottom - top; // can be any number int width = 2 * height; // must be even int peaks = Compatibility.ceil(right - left, width); if (peaks == 0 && right - left > 2) { peaks = 1; } int length = ((2 * peaks) + 1) * 2; if (length < 0) return new float[0]; float[] coordinates = new float[length]; for (int i = 0; i < peaks; i++) { int index = 4 * i; coordinates[index] = left + (width * i); coordinates[index+1] = bottom; coordinates[index+2] = coordinates[index] + width / 2; coordinates[index+3] = top; } coordinates[length-2] = left + (width * peaks); coordinates[length-1] = bottom; return coordinates; }
/** * Returns the index of the last partially visible line. * * @return index of the last partially visible line. */ int getPartialBottomIndex() { if (isFixedLineHeight()) { int lineHeight = renderer.getLineHeight(); int partialLineCount = Compatibility.ceil(clientAreaHeight, lineHeight); return Math.max(0, Math.min(content.getLineCount(), topIndex + partialLineCount) - 1); } return getLineIndex(clientAreaHeight - bottomMargin); } /**
/** * Returns the index of the last partially visible line. * * @return index of the last partially visible line. */ int getPartialBottomIndex() { if (isFixedLineHeight()) { int lineHeight = renderer.getLineHeight(); int partialLineCount = Compatibility.ceil(clientAreaHeight, lineHeight); return Math.max(0, Math.min(content.getLineCount(), topIndex + partialLineCount) - 1); } return getLineIndex(clientAreaHeight - bottomMargin); } /**
/** * Returns the index of the last partially visible line. * * @return index of the last partially visible line. */ int getPartialBottomIndex() { if (isFixedLineHeight()) { int lineHeight = renderer.getLineHeight(); int partialLineCount = Compatibility.ceil(clientAreaHeight, lineHeight); return Math.max(0, Math.min(content.getLineCount(), topIndex + partialLineCount) - 1); } return getLineIndex(clientAreaHeight - bottomMargin); } /**
/** * Returns the index of the last partially visible line. * * @return index of the last partially visible line. */ int getPartialBottomIndex() { if (isFixedLineHeight()) { int lineHeight = renderer.getLineHeight(); int partialLineCount = Compatibility.ceil(clientAreaHeight, lineHeight); return Math.max(0, Math.min(content.getLineCount(), topIndex + partialLineCount) - 1); } return getLineIndex(clientAreaHeight - bottomMargin); } /**
/** * Returns the index of the last partially visible line. * * @return index of the last partially visible line. */ int getPartialBottomIndex() { if (isFixedLineHeight()) { int lineHeight = renderer.getLineHeight(); int partialLineCount = Compatibility.ceil(clientAreaHeight, lineHeight); return Math.max(0, Math.min(content.getLineCount(), topIndex + partialLineCount) - 1); } return getLineIndex(clientAreaHeight - bottomMargin); } /**
return; topIndex = Compatibility.ceil(getVerticalScrollOffset(), verticalIncrement);
return; topIndex = Compatibility.ceil(getVerticalScrollOffset(), verticalIncrement);
return; topIndex = Compatibility.ceil(getVerticalScrollOffset(), verticalIncrement);
return; topIndex = Compatibility.ceil(getVerticalScrollOffset(), verticalIncrement);
return; topIndex = Compatibility.ceil(getVerticalScrollOffset(), verticalIncrement);