Android examples for Graphics:Path
mirror Path Up Down
//package com.java2s; import android.graphics.Matrix; import android.graphics.Path; import android.graphics.RectF; public class Main { /**// www . j ava 2s. com * Spiegel an der horizontalen x-Achse * * @param x * Position um die gefreht wird * @param y * Position um die gefreht wird * @param path * der pfad der gemirrored werden soll */ public static void mirrorPathUpDown(final float x, final float y, final Path path) { final Matrix mMatrix = new Matrix(); final RectF bounds = new RectF(); path.computeBounds(bounds, true); mMatrix.postScale(1f, -1f, x, y); path.transform(mMatrix); } }