本文整理汇总了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.");
}
}
示例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());
}
}
}
示例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);
}
示例4: getTransform
import android.graphics.Matrix; //导入方法依赖的package包/类
@Override
public void getTransform(Matrix transform) {
getParentTransform(transform);
if (!mRotationMatrix.isIdentity()) {
transform.preConcat(mRotationMatrix);
}
}
示例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);
}
}
示例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);
}
}
示例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());
}
}
示例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());
}
}
示例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;
}
}
示例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());
}
}