use of com.slidingmenu.lib.SlidingMenu.CanvasTransformer in project weiciyuan by qii.
the class CanvasTransformerBuilder method translate.
public CanvasTransformer translate(final int openedX, final int closedX, final int openedY, final int closedY, final Interpolator interp) {
initTransformer();
mTrans = new CanvasTransformer() {
public void transformCanvas(Canvas canvas, float percentOpen) {
mTrans.transformCanvas(canvas, percentOpen);
float f = interp.getInterpolation(percentOpen);
canvas.translate((openedX - closedX) * f + closedX, (openedY - closedY) * f + closedY);
}
};
return mTrans;
}
use of com.slidingmenu.lib.SlidingMenu.CanvasTransformer in project little-bear-dictionary by daimajia.
the class CanvasTransformerBuilder method zoom.
public CanvasTransformer zoom(final int openedX, final int closedX, final int openedY, final int closedY, final int px, final int py, final Interpolator interp) {
initTransformer();
mTrans = new CanvasTransformer() {
public void transformCanvas(Canvas canvas, float percentOpen) {
mTrans.transformCanvas(canvas, percentOpen);
float f = interp.getInterpolation(percentOpen);
canvas.scale((openedX - closedX) * f + closedX, (openedY - closedY) * f + closedY, px, py);
}
};
return mTrans;
}
use of com.slidingmenu.lib.SlidingMenu.CanvasTransformer in project little-bear-dictionary by daimajia.
the class CanvasTransformerBuilder method translate.
public CanvasTransformer translate(final int openedX, final int closedX, final int openedY, final int closedY, final Interpolator interp) {
initTransformer();
mTrans = new CanvasTransformer() {
public void transformCanvas(Canvas canvas, float percentOpen) {
mTrans.transformCanvas(canvas, percentOpen);
float f = interp.getInterpolation(percentOpen);
canvas.translate((openedX - closedX) * f + closedX, (openedY - closedY) * f + closedY);
}
};
return mTrans;
}
use of com.slidingmenu.lib.SlidingMenu.CanvasTransformer in project little-bear-dictionary by daimajia.
the class CanvasTransformerBuilder method concatTransformer.
public CanvasTransformer concatTransformer(final CanvasTransformer t) {
initTransformer();
mTrans = new CanvasTransformer() {
public void transformCanvas(Canvas canvas, float percentOpen) {
mTrans.transformCanvas(canvas, percentOpen);
t.transformCanvas(canvas, percentOpen);
}
};
return mTrans;
}
use of com.slidingmenu.lib.SlidingMenu.CanvasTransformer in project weiciyuan by qii.
the class CanvasTransformerBuilder method zoom.
public CanvasTransformer zoom(final int openedX, final int closedX, final int openedY, final int closedY, final int px, final int py, final Interpolator interp) {
initTransformer();
mTrans = new CanvasTransformer() {
public void transformCanvas(Canvas canvas, float percentOpen) {
mTrans.transformCanvas(canvas, percentOpen);
float f = interp.getInterpolation(percentOpen);
canvas.scale((openedX - closedX) * f + closedX, (openedY - closedY) * f + closedY, px, py);
}
};
return mTrans;
}
Aggregations