Skip to content

Commit

Permalink
Renamed calculateRawDistanceY into computeRawDistanceY
Browse files Browse the repository at this point in the history
  • Loading branch information
lecho committed Jan 29, 2015
1 parent ec084b6 commit eb3f0c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public float computeRawDistanceX(float distance) {
/**
* Translates viewport distance int pixel distance for X coordinates.
*/
public float calculateRawDistanceY(float distance) {
public float computeRawDistanceY(float distance) {
return distance * (contentRectMinusAllMargins.height() / currentViewport.height());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import lecho.lib.hellocharts.formatter.BubbleChartValueFormatter;
import lecho.lib.hellocharts.model.BubbleChartData;
import lecho.lib.hellocharts.model.BubbleValue;
import lecho.lib.hellocharts.model.ColumnChartData;
import lecho.lib.hellocharts.model.SelectedValue.SelectedValueType;
import lecho.lib.hellocharts.model.ValueShape;
import lecho.lib.hellocharts.model.Viewport;
Expand Down Expand Up @@ -40,7 +39,7 @@ public class BubbleChartRenderer extends AbstractChartRenderer {
/**
* True if bubbleScale = bubbleScaleX so the renderer should used {@link ChartComputator#computeRawDistanceX(float)}
* , if false bubbleScale = bubbleScaleY and renderer should use
* {@link ChartComputator#calculateRawDistanceY(float)}.
* {@link ChartComputator#computeRawDistanceY(float)}.
*/
private boolean isBubbleScaledByX = true;

Expand Down Expand Up @@ -164,7 +163,7 @@ public void removeMargins() {
return;
}
final float pxX = computator.computeRawDistanceX(maxRadius * bubbleScaleX);
final float pxY = computator.calculateRawDistanceY(maxRadius * bubbleScaleY);
final float pxY = computator.computeRawDistanceY(maxRadius * bubbleScaleY);
final float scaleX = computator.getMaximumViewport().width() / contentRect.width();
final float scaleY = computator.getMaximumViewport().height() / contentRect.height();
float dx = 0;
Expand Down Expand Up @@ -248,7 +247,7 @@ private float processBubble(BubbleValue bubbleValue, PointF point) {
rawRadius = computator.computeRawDistanceX(radius);
} else {
radius *= bubbleScaleY;
rawRadius = computator.calculateRawDistanceY(radius);
rawRadius = computator.computeRawDistanceY(radius);
}

if (rawRadius < minRawRadius + touchAdditional) {
Expand Down

0 comments on commit eb3f0c2

Please sign in to comment.