INNER CODE UNIT · Java
shapeSize
jjoe64/GraphView · src/main/java/com/jjoe64/graphview/CursorMode.java:142
int shapeSize = (int) (mStyles.textSize*0.8d);
// width
int legendWidth = mStyles.width;
if (legendWidth == 0) {
// auto
legendWidth = cachedLegendWidth;
if (legendWidth == 0) {
Rect textBounds = new Rect();
for (Map.Entry<BaseSeries, DataPointInterface> entry : mCurrentSelection.entrySet()) {
String txt = getTextForSeries(entry.getKey(), entry.getValue());
mTextPaint.getTextBounds(txt, 0, txt.length(), textBounds);
legendWidth = Math.max(legendWidth, textBounds.width());
}
if (legendWidth == 0) legendWidth = 1;
// add shape size