INNER CODE UNIT · Java
legendHeight
jjoe64/GraphView · src/main/java/com/jjoe64/graphview/CursorMode.java:171
float legendHeight = (mStyles.textSize+mStyles.spacing) * (mCurrentSelection.size() + 1) -mStyles.spacing;
float legendPosY = mPosY - legendHeight - 4.5f * mStyles.textSize;
if (legendPosY < 0) {
legendPosY = 0;
}
float lLeft;
float lTop;
lLeft = legendPosX;
lTop = legendPosY;
float lRight = lLeft+legendWidth;
float lBottom = lTop+legendHeight+2*mStyles.padding;
mRectPaint.setColor(mStyles.backgroundColor);
canvas.drawRoundRect(new RectF(lLeft, lTop, lRight, lBottom), 8, 8, mRectPaint);
mTextPaint.setFakeBoldText(true);