Skip to content

Commit 3e6b94b

Browse files
committed
Cosmetic
1 parent b8b2f04 commit 3e6b94b

File tree

1 file changed

+7
-21
lines changed

1 file changed

+7
-21
lines changed

MPChartLib/src/main/java/com/github/mikephil/charting/utils/ViewPortHandler.kt

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,7 @@ open class ViewPortHandler {
139139

140140
/** CODE BELOW THIS RELATED TO SCALING AND GESTURES */
141141
/**
142-
* Zooms in by 1.4f, x and y are the coordinates (in pixels) of the zoom
143-
* center.
142+
* Zooms in by 1.4f, x and y are the coordinates (in pixels) of the zoom center.
144143
*/
145144
fun zoomIn(x: Float, y: Float): Matrix {
146145
val save = Matrix()
@@ -155,8 +154,7 @@ open class ViewPortHandler {
155154
}
156155

157156
/**
158-
* Zooms out by 0.7f, x and y are the coordinates (in pixels) of the zoom
159-
* center.
157+
* Zooms out by 0.7f, x and y are the coordinates (in pixels) of the zoom center.
160158
*/
161159
fun zoomOut(x: Float, y: Float): Matrix {
162160
val save = Matrix()
@@ -200,11 +198,6 @@ open class ViewPortHandler {
200198

201199
/**
202200
* Post-scales by the specified scale factors. x and y is pivot.
203-
*
204-
* @param scaleX
205-
* @param scaleY
206-
* @param x
207-
* @param y
208201
*/
209202
fun zoom(scaleX: Float, scaleY: Float, x: Float, y: Float): Matrix {
210203
val save = Matrix()
@@ -248,8 +241,7 @@ open class ViewPortHandler {
248241
protected var valsBufferForFitScreen: FloatArray = FloatArray(9)
249242

250243
/**
251-
* Resets all zooming and dragging and makes the chart fit exactly it's
252-
* bounds.
244+
* Resets all zooming and dragging and makes the chart fit exactly it's bounds.
253245
*/
254246
fun fitScreen(): Matrix {
255247
val save = Matrix()
@@ -285,8 +277,6 @@ open class ViewPortHandler {
285277

286278
/**
287279
* Post-translates to the specified points. Less Performant.
288-
*
289-
* @param transformedPts
290280
*/
291281
fun translate(transformedPts: FloatArray): Matrix {
292282
val save = Matrix()
@@ -296,8 +286,6 @@ open class ViewPortHandler {
296286

297287
/**
298288
* Post-translates to the specified points. Output matrix allows for caching objects.
299-
*
300-
* @param transformedPts
301289
*/
302290
fun translate(transformedPts: FloatArray, outputMatrix: Matrix) {
303291
outputMatrix.reset()
@@ -316,8 +304,6 @@ open class ViewPortHandler {
316304
* setScaleMinima(...) method.
317305
*
318306
* @param transformedPts the position to center view viewport to
319-
* @param view
320-
* @return save
321307
*/
322308
fun centerViewPort(transformedPts: FloatArray, view: View?) {
323309
val save = mCenterViewPortMatrixBuffer
@@ -339,8 +325,6 @@ open class ViewPortHandler {
339325

340326
/**
341327
* call this method to refresh the graph with a given matrix
342-
*
343-
* @param newMatrix
344328
*/
345329
fun refresh(newMatrix: Matrix, view: View?, invalidate: Boolean): Matrix {
346330
matrixTouch.set(newMatrix)
@@ -357,8 +341,6 @@ open class ViewPortHandler {
357341

358342
/**
359343
* limits the maximum scale and X translation of the given matrix
360-
*
361-
* @param matrix
362344
*/
363345
fun limitTransAndScale(matrix: Matrix, content: RectF?) {
364346
matrix.getValues(matrixBuffer)
@@ -567,4 +549,8 @@ open class ViewPortHandler {
567549
* Returns true if the chart is not yet fully zoomed in on the y-axis
568550
*/
569551
fun canZoomInMoreY(): Boolean = scaleY < maxScaleY
552+
553+
override fun toString(): String {
554+
return "ViewPortHandler: \nContentRect: $contentRect\nMatrixTouch: $matrixTouch\nScaleX: $scaleX, ScaleY: $scaleY\nTransX: $transX, TransY: $transY"
555+
}
570556
}

0 commit comments

Comments
 (0)