本文整理汇总了Java中com.github.mikephil.charting.utils.FSize类的典型用法代码示例。如果您正苦于以下问题:Java FSize类的具体用法?Java FSize怎么用?Java FSize使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FSize类属于com.github.mikephil.charting.utils包,在下文中一共展示了FSize类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: computeSize
import com.github.mikephil.charting.utils.FSize; //导入依赖的package包/类
@Override
protected void computeSize() {
mAxisLabelPaint.setTypeface(mXAxis.getTypeface());
mAxisLabelPaint.setTextSize(mXAxis.getTextSize());
String longest = mXAxis.getLongestLabel();
final FSize labelSize = Utils.calcTextSize(mAxisLabelPaint, longest);
final float labelWidth = (int)(labelSize.width + mXAxis.getXOffset() * 3.5f);
final float labelHeight = labelSize.height;
final FSize labelRotatedSize = Utils.getSizeOfRotatedRectangleByDegrees(
labelSize.width,
labelHeight,
mXAxis.getLabelRotationAngle());
mXAxis.mLabelWidth = Math.round(labelWidth);
mXAxis.mLabelHeight = Math.round(labelHeight);
mXAxis.mLabelRotatedWidth = (int)(labelRotatedSize.width + mXAxis.getXOffset() * 3.5f);
mXAxis.mLabelRotatedHeight = Math.round(labelRotatedSize.height);
FSize.recycleInstance(labelRotatedSize);
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:26,代码来源:XAxisRendererHorizontalBarChart.java
示例2: computeSize
import com.github.mikephil.charting.utils.FSize; //导入依赖的package包/类
protected void computeSize() {
String longest = mXAxis.getLongestLabel();
mAxisLabelPaint.setTypeface(mXAxis.getTypeface());
mAxisLabelPaint.setTextSize(mXAxis.getTextSize());
final FSize labelSize = Utils.calcTextSize(mAxisLabelPaint, longest);
final float labelWidth = labelSize.width;
final float labelHeight = Utils.calcTextHeight(mAxisLabelPaint, "Q");
final FSize labelRotatedSize = Utils.getSizeOfRotatedRectangleByDegrees(
labelWidth,
labelHeight,
mXAxis.getLabelRotationAngle());
mXAxis.mLabelWidth = Math.round(labelWidth);
mXAxis.mLabelHeight = Math.round(labelHeight);
mXAxis.mLabelRotatedWidth = Math.round(labelRotatedSize.width);
mXAxis.mLabelRotatedHeight = Math.round(labelRotatedSize.height);
FSize.recycleInstance(labelRotatedSize);
FSize.recycleInstance(labelSize);
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:27,代码来源:XAxisRenderer.java
示例3: computeAxis
import com.github.mikephil.charting.utils.FSize; //导入依赖的package包/类
@Override
public void computeAxis(float xValAverageLength, List<String> xValues) {
mAxisLabelPaint.setTypeface(mXAxis.getTypeface());
mAxisLabelPaint.setTextSize(mXAxis.getTextSize());
mXAxis.setValues(xValues);
String longest = mXAxis.getLongestLabel();
final FSize labelSize = Utils.calcTextSize(mAxisLabelPaint, longest);
final float labelWidth = (int)(labelSize.width + mXAxis.getXOffset() * 3.5f);
final float labelHeight = labelSize.height;
final FSize labelRotatedSize = Utils.getSizeOfRotatedRectangleByDegrees(
labelSize.width,
labelHeight,
mXAxis.getLabelRotationAngle());
mXAxis.mLabelWidth = Math.round(labelWidth);
mXAxis.mLabelHeight = Math.round(labelHeight);
mXAxis.mLabelRotatedWidth = (int)(labelRotatedSize.width + mXAxis.getXOffset() * 3.5f);
mXAxis.mLabelRotatedHeight = Math.round(labelRotatedSize.height);
}
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:25,代码来源:XAxisRendererHorizontalBarChart.java
示例4: computeAxis
import com.github.mikephil.charting.utils.FSize; //导入依赖的package包/类
public void computeAxis(float xValMaximumLength, List<String> xValues) {
mAxisLabelPaint.setTypeface(mXAxis.getTypeface());
mAxisLabelPaint.setTextSize(mXAxis.getTextSize());
StringBuilder widthText = new StringBuilder();
int xValChars = Math.round(xValMaximumLength);
for (int i = 0; i < xValChars; i++) {
widthText.append('h');
}
final FSize labelSize = Utils.calcTextSize(mAxisLabelPaint, widthText.toString());
final float labelWidth = labelSize.width;
final float labelHeight = Utils.calcTextHeight(mAxisLabelPaint, "Q");
final FSize labelRotatedSize = Utils.getSizeOfRotatedRectangleByDegrees(
labelWidth,
labelHeight,
mXAxis.getLabelRotationAngle());
StringBuilder space = new StringBuilder();
int xValSpaceChars = mXAxis.getSpaceBetweenLabels();
for (int i = 0; i < xValSpaceChars; i++) {
space.append('h');
}
final FSize spaceSize = Utils.calcTextSize(mAxisLabelPaint, space.toString());
mXAxis.mLabelWidth = Math.round(labelWidth + spaceSize.width);
mXAxis.mLabelHeight = Math.round(labelHeight);
mXAxis.mLabelRotatedWidth = Math.round(labelRotatedSize.width + spaceSize.width);
mXAxis.mLabelRotatedHeight = Math.round(labelRotatedSize.height);
mXAxis.setValues(xValues);
}
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:40,代码来源:XAxisRenderer.java
示例5: getSize
import com.github.mikephil.charting.utils.FSize; //导入依赖的package包/类
public FSize getSize() {
return mSize;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:MarkerImage.java
示例6: getCalculatedLabelSizes
import com.github.mikephil.charting.utils.FSize; //导入依赖的package包/类
public List<FSize> getCalculatedLabelSizes() {
return mCalculatedLabelSizes;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:Legend.java
示例7: getCalculatedLineSizes
import com.github.mikephil.charting.utils.FSize; //导入依赖的package包/类
public List<FSize> getCalculatedLineSizes() {
return mCalculatedLineSizes;
}
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:4,代码来源:Legend.java
示例8: getCalculatedLabelSizes
import com.github.mikephil.charting.utils.FSize; //导入依赖的package包/类
public FSize[] getCalculatedLabelSizes() {
return mCalculatedLabelSizes;
}
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:4,代码来源:Legend.java
示例9: getCalculatedLineSizes
import com.github.mikephil.charting.utils.FSize; //导入依赖的package包/类
public FSize[] getCalculatedLineSizes() {
return mCalculatedLineSizes;
}
开发者ID:rahulmaddineni,项目名称:Stayfit,代码行数:4,代码来源:Legend.java
注:本文中的com.github.mikephil.charting.utils.FSize类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论