com.github.mikephil.charting.utils.Utils.getSizeOfRotatedRectangleByDegrees()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(9.7k)|赞(0)|评价(0)|浏览(97)

本文整理了Java中com.github.mikephil.charting.utils.Utils.getSizeOfRotatedRectangleByDegrees()方法的一些代码示例,展示了Utils.getSizeOfRotatedRectangleByDegrees()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getSizeOfRotatedRectangleByDegrees()方法的具体详情如下:
包路径:com.github.mikephil.charting.utils.Utils
类名称:Utils
方法名:getSizeOfRotatedRectangleByDegrees

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,

相关文章