当前位置: 首页>>代码示例>>Java>>正文


Java Matrix.preConcat方法代码示例

本文整理汇总了Java中android.graphics.Matrix.preConcat方法的典型用法代码示例。如果您正苦于以下问题:Java Matrix.preConcat方法的具体用法?Java Matrix.preConcat怎么用?Java Matrix.preConcat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.graphics.Matrix的用法示例。


在下文中一共展示了Matrix.preConcat方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: drawTexture

import android.graphics.Matrix; //导入方法依赖的package包/类
/**
 * Draws a VideoFrame.TextureBuffer. Calls either drawer.drawOes or drawer.drawRgb
 * depending on the type of the buffer. You can supply an additional render matrix. This is
 * used multiplied together with the transformation matrix of the frame. (M = renderMatrix *
 * transformationMatrix)
 */
static void drawTexture(RendererCommon.GlDrawer drawer, VideoFrame.TextureBuffer buffer,
    Matrix renderMatrix, int frameWidth, int frameHeight, int viewportX, int viewportY,
    int viewportWidth, int viewportHeight) {
  Matrix finalMatrix = new Matrix(buffer.getTransformMatrix());
  finalMatrix.preConcat(renderMatrix);
  float[] finalGlMatrix = RendererCommon.convertMatrixFromAndroidGraphicsMatrix(finalMatrix);
  switch (buffer.getType()) {
    case OES:
      drawer.drawOes(buffer.getTextureId(), finalGlMatrix, frameWidth, frameHeight, viewportX,
          viewportY, viewportWidth, viewportHeight);
      break;
    case RGB:
      drawer.drawRgb(buffer.getTextureId(), finalGlMatrix, frameWidth, frameHeight, viewportX,
          viewportY, viewportWidth, viewportHeight);
      break;
    default:
      throw new RuntimeException("Unknown texture type.");
  }
}
 
开发者ID:Piasy,项目名称:AppRTC-Android,代码行数:26,代码来源:VideoFrameDrawer.java

示例2: offsetDescendantMatrix

import android.graphics.Matrix; //导入方法依赖的package包/类
static void offsetDescendantMatrix(ViewParent target, View view, Matrix m) {
    final ViewParent parent = view.getParent();
    if (parent instanceof View && parent != target) {
        final View vp = (View) parent;
        offsetDescendantMatrix(target, vp, m);
        m.preTranslate(-vp.getScrollX(), -vp.getScrollY());
    }

    m.preTranslate(view.getLeft(), view.getTop());

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        if (!view.getMatrix().isIdentity()) {
            m.preConcat(view.getMatrix());
        }
    }
}
 
开发者ID:Alcatraz323,项目名称:MaterialOCR,代码行数:17,代码来源:ViewGroupUtilsHoneycomb.java

示例3: addObjectToClip

import android.graphics.Matrix; //导入方法依赖的package包/类
private void addObjectToClip(SVG.Path obj, Path combinedPath,
		Matrix combinedPathMatrix) {
	updateStyleForElement(state, obj);

	if (!display())
		return;
	if (!visible())
		return;

	if (obj.transform != null)
		combinedPathMatrix.preConcat(obj.transform);

	Path path = (new PathConverter(obj.d)).getPath();

	if (obj.boundingBox == null) {
		obj.boundingBox = calculatePathBounds(path);
	}
	checkForClipPath(obj);

	// path.setFillType(getClipRuleFromState());
	combinedPath.setFillType(getClipRuleFromState());
	combinedPath.addPath(path, combinedPathMatrix);
}
 
开发者ID:mkulesh,项目名称:microMathematics,代码行数:24,代码来源:SVGAndroidRenderer.java

示例4: getTransform

import android.graphics.Matrix; //导入方法依赖的package包/类
@Override
public void getTransform(Matrix transform) {
  getParentTransform(transform);
  if (!mRotationMatrix.isIdentity()) {
    transform.preConcat(mRotationMatrix);
  }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:OrientedDrawable.java

示例5: getTransform

import android.graphics.Matrix; //导入方法依赖的package包/类
/**
 * TransformationCallback method
 * @param transform
 */
@Override
public void getTransform(Matrix transform) {
  getParentTransform(transform);
  // IMPORTANT: {@code configureBounds} should be called after {@code getParentTransform},
  // because the parent may have to change our bounds.
  configureBoundsIfUnderlyingChanged();
  if (mDrawMatrix != null) {
    transform.preConcat(mDrawMatrix);
  }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:15,代码来源:ScaleTypeDrawable.java

示例6: getTransform

import android.graphics.Matrix; //导入方法依赖的package包/类
/**
 * TransformationCallback method
 * @param transform
 */
@Override
public void getTransform(Matrix transform) {
  super.getTransform(transform);
  if (mDrawMatrix != null) {
    transform.preConcat(mDrawMatrix);
  }
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:12,代码来源:MatrixDrawable.java

示例7: offsetDescendantMatrix

import android.graphics.Matrix; //导入方法依赖的package包/类
static void offsetDescendantMatrix(ViewParent target, View view, Matrix m) {
    final ViewParent parent = view.getParent();
    if (parent instanceof View && parent != target) {
        final View vp = (View) parent;
        offsetDescendantMatrix(target, vp, m);
        m.preTranslate(-vp.getScrollX(), -vp.getScrollY());
    }

    m.preTranslate(view.getLeft(), view.getTop());

    if (!view.getMatrix().isIdentity()) {
        m.preConcat(view.getMatrix());
    }
}
 
开发者ID:coopese,项目名称:qmui,代码行数:15,代码来源:QMUIViewHelper.java

示例8: offsetDescendantMatrix

import android.graphics.Matrix; //导入方法依赖的package包/类
private static void offsetDescendantMatrix(ViewParent target, View view, Matrix m) {
    final ViewParent parent = view.getParent();
    if (parent instanceof View && parent != target) {
        final View vp = (View) parent;
        offsetDescendantMatrix(target, vp, m);
        m.preTranslate(-vp.getScrollX(), -vp.getScrollY());
    }

    m.preTranslate(view.getLeft(), view.getTop());

    if (!view.getMatrix().isIdentity()) {
        m.preConcat(view.getMatrix());
    }
}
 
开发者ID:commonsguy,项目名称:cwac-crossport,代码行数:15,代码来源:ViewGroupUtils.java

示例9: inherit

import android.graphics.Matrix; //导入方法依赖的package包/类
public void inherit(Gradient parent) {
    Gradient child = this;
    child.xlink = parent.id;
    child.positions = parent.positions;
    child.colors = parent.colors;
    if (child.matrix == null) {
        child.matrix = parent.matrix;
    } else if (parent.matrix != null) {
    	Matrix m = new Matrix(parent.matrix);
        m.preConcat(child.matrix);
        child.matrix = m;
    }
}
 
开发者ID:dreaminglion,项目名称:iosched-reader,代码行数:14,代码来源:SVGParser.java

示例10: offsetDescendantMatrix

import android.graphics.Matrix; //导入方法依赖的package包/类
static void offsetDescendantMatrix(ViewParent target, View view, Matrix m) {
    ViewParent parent = view.getParent();
    if ((parent instanceof View) && parent != target) {
        View vp = (View) parent;
        offsetDescendantMatrix(target, vp, m);
        m.preTranslate((float) (-vp.getScrollX()), (float) (-vp.getScrollY()));
    }
    m.preTranslate((float) view.getLeft(), (float) view.getTop());
    if (!view.getMatrix().isIdentity()) {
        m.preConcat(view.getMatrix());
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:13,代码来源:ViewGroupUtilsHoneycomb.java


注:本文中的android.graphics.Matrix.preConcat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。