本文整理了Java中com.github.mikephil.charting.utils.Utils.getSizeOfRotatedRectangleByDegrees()
方法的一些代码示例,展示了Utils.getSizeOfRotatedRectangleByDegrees()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getSizeOfRotatedRectangleByDegrees()
方法的具体详情如下:
包路径:com.github.mikephil.charting.utils.Utils
类名称:Utils
方法名:getSizeOfRotatedRectangleByDegrees
[英]Returns a recyclable FSize instance. Represents size of a rotated rectangle by degrees.
[中]返回一个可回收的FSize实例。以度表示旋转矩形的大小。
代码示例来源:origin: PhilJay/MPAndroidChart
final FSize rotatedSize = getSizeOfRotatedRectangleByDegrees(
mDrawTextRectBuffer.width(),
lineHeight,
代码示例来源:origin: PhilJay/MPAndroidChart
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);
}
代码示例来源:origin: PhilJay/MPAndroidChart
@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);
}
代码示例来源:origin: PhilJay/MPAndroidChart
final FSize rotatedSize = getSizeOfRotatedRectangleByDegrees(
drawWidth,
drawHeight,
代码示例来源:origin: xiaolongonly/Ticket-Analysis
final FSize rotatedSize = getSizeOfRotatedRectangleByDegrees(
mDrawTextRectBuffer.width(),
lineHeight,
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
final FSize rotatedSize = getSizeOfRotatedRectangleByDegrees(
mDrawTextRectBuffer.width(),
lineHeight,
代码示例来源:origin: WenWangAndroid/ChartManager
final FSize rotatedSize = getSizeOfRotatedRectangleByDegrees(
mDrawTextRectBuffer.width(),
lineHeight,
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
final FSize rotatedSize = getSizeOfRotatedRectangleByDegrees(
mDrawTextRectBuffer.width(),
lineHeight,
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
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);
}
代码示例来源:origin: xiaolongonly/Ticket-Analysis
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);
}
代码示例来源:origin: WenWangAndroid/ChartManager
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);
}
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
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);
}
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
@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);
}
代码示例来源:origin: xiaolongonly/Ticket-Analysis
@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);
}
代码示例来源:origin: WenWangAndroid/ChartManager
@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);
}
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
@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);
}
代码示例来源:origin: WenWangAndroid/ChartManager
final FSize rotatedSize = getSizeOfRotatedRectangleByDegrees(
drawWidth,
drawHeight,
代码示例来源:origin: com.github.PhilJay/MPAndroidChart
final FSize rotatedSize = getSizeOfRotatedRectangleByDegrees(
drawWidth,
drawHeight,
代码示例来源:origin: xiaolongonly/Ticket-Analysis
final FSize rotatedSize = getSizeOfRotatedRectangleByDegrees(
drawWidth,
drawHeight,
代码示例来源:origin: WallaceXiao/StockChart-MPAndroidChart
final FSize rotatedSize = getSizeOfRotatedRectangleByDegrees(
drawWidth,
drawHeight,
内容来源于网络,如有侵权,请联系作者删除!