android.graphics.Camera.getLocationX()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(130)

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

Camera.getLocationX介绍

暂无

代码示例

代码示例来源:origin: square/assertj-android

@TargetApi(JELLY_BEAN)
public CameraAssert hasLocationX(float location) {
 isNotNull();
 float actualLocation = actual.getLocationX();
 assertThat(actualLocation) //
   .overridingErrorMessage("Expected X location <%s> but was <%s>.", location,
     actualLocation) //
   .isEqualTo(location);
 return this;
}

代码示例来源:origin: com.squareup.assertj/assertj-android

@TargetApi(JELLY_BEAN)
public CameraAssert hasLocationX(float location) {
 isNotNull();
 float actualLocation = actual.getLocationX();
 assertThat(actualLocation) //
   .overridingErrorMessage("Expected X location <%s> but was <%s>.", location,
     actualLocation) //
   .isEqualTo(location);
 return this;
}

代码示例来源:origin: luhaoaimama1/zone-sdk

@TargetApi(Build.VERSION_CODES.JELLY_BEAN)
  @Override
  protected void applyTransformation(
      float interpolatedTime,
      Transformation t) {
    final Matrix matrix = t.getMatrix();
    mCamera.save();

    mCamera.translate(mX * interpolatedTime, mY * interpolatedTime, mZ * interpolatedTime);

    mCamera.rotateX(mRotateX * interpolatedTime);
    mCamera.rotate(0, mRotateY * interpolatedTime, 0);
    mCamera.rotateZ(mRotateZ * interpolatedTime);

    // 将旋转变换作用到matrix上
    mCamera.getMatrix(matrix);
    mCamera.restore();
    System.out.println("mRotateX:___" + mRotateX + "\t mRotateY:" + mRotateY + "\t mRotateZ:" + mRotateZ);
    System.out.println("camera x:" + mCamera.getLocationX() + "\t y:" + mCamera.getLocationY() + "\t z:" + mCamera.getLocationZ());
    System.out.println("Matrix:___" + matrix.toString());

    // 通过pre方法设置矩阵作用前的偏移量来改变旋转中心
//        matrix.preTranslate(mCenterWidth, mCenterHeight);
//        matrix.postTranslate(-mCenterWidth, -mCenterHeight);
  }
}

相关文章