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


Java CanvasTransformer类代码示例

本文整理汇总了Java中com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer的典型用法代码示例。如果您正苦于以下问题:Java CanvasTransformer类的具体用法?Java CanvasTransformer怎么用?Java CanvasTransformer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CanvasTransformer类属于com.jeremyfeinstein.slidingmenu.lib.SlidingMenu包,在下文中一共展示了CanvasTransformer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: zoom

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
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;
}
 
开发者ID:HueToYou,项目名称:ChatExchange-old,代码行数:18,代码来源:CanvasTransformerBuilder.java

示例2: rotate

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
public CanvasTransformer rotate(final int openedDeg, final int closedDeg,
                                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.rotate((openedDeg - closedDeg) * f + closedDeg,
                    px, py);
        }
    };
    return mTrans;
}
 
开发者ID:HueToYou,项目名称:ChatExchange-old,代码行数:17,代码来源:CanvasTransformerBuilder.java

示例3: translate

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
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;
}
 
开发者ID:HueToYou,项目名称:ChatExchange-old,代码行数:17,代码来源:CanvasTransformerBuilder.java

示例4: zoom

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
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;
}
 
开发者ID:Datatellit,项目名称:xlight_android_native,代码行数:15,代码来源:CanvasTransformerBuilder.java

示例5: rotate

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
public CanvasTransformer rotate(final int openedDeg, final int closedDeg, 
		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.rotate((openedDeg - closedDeg) * f + closedDeg, 
					px, py);
		}			
	};
	return mTrans;
}
 
开发者ID:Datatellit,项目名称:xlight_android_native,代码行数:14,代码来源:CanvasTransformerBuilder.java

示例6: translate

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
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;
}
 
开发者ID:Datatellit,项目名称:xlight_android_native,代码行数:12,代码来源:CanvasTransformerBuilder.java

示例7: concatTransformer

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
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;
}
 
开发者ID:Datatellit,项目名称:xlight_android_native,代码行数:11,代码来源:CanvasTransformerBuilder.java

示例8: concatTransformer

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
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;
}
 
开发者ID:HueToYou,项目名称:ChatExchange-old,代码行数:14,代码来源:CanvasTransformerBuilder.java

示例9: translate

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
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;
}
 
开发者ID:6ag,项目名称:LiuAGeAndroid,代码行数:14,代码来源:CanvasTransformerBuilder.java

示例10: zoom

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
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;
}
 
开发者ID:hkq325800,项目名称:YellowNote,代码行数:15,代码来源:CanvasTransformerBuilder.java

示例11: rotate

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
public CanvasTransformer rotate(final int openedDeg, final int closedDeg,
                                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.rotate((openedDeg - closedDeg) * f + closedDeg,
                    px, py);
        }
    };
    return mTrans;
}
 
开发者ID:hkq325800,项目名称:YellowNote,代码行数:14,代码来源:CanvasTransformerBuilder.java

示例12: translate

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
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;
}
 
开发者ID:hkq325800,项目名称:YellowNote,代码行数:14,代码来源:CanvasTransformerBuilder.java

示例13: concatTransformer

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
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;
}
 
开发者ID:hkq325800,项目名称:YellowNote,代码行数:11,代码来源:CanvasTransformerBuilder.java

示例14: CustomZoomAnimation

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
public CustomZoomAnimation() {
	// see the class CustomAnimation for how to attach 
	// the CanvasTransformer to the SlidingMenu
	super(R.string.anim_zoom, new CanvasTransformer() {
		@Override
		public void transformCanvas(Canvas canvas, float percentOpen) {
			float scale = (float) (percentOpen*0.25 + 0.75);
			canvas.scale(scale, scale, canvas.getWidth()/2, canvas.getHeight()/2);
		}
	});
}
 
开发者ID:JoeSteven,项目名称:Moring-Alarm,代码行数:12,代码来源:CustomZoomAnimation.java

示例15: CustomScaleAnimation

import com.jeremyfeinstein.slidingmenu.lib.SlidingMenu.CanvasTransformer; //导入依赖的package包/类
public CustomScaleAnimation() {
	super(R.string.anim_scale, new CanvasTransformer() {
		@Override
		public void transformCanvas(Canvas canvas, float percentOpen) {
			canvas.scale(percentOpen, 1, 0, 0);
		}			
	});
}
 
开发者ID:JoeSteven,项目名称:Moring-Alarm,代码行数:9,代码来源:CustomScaleAnimation.java


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