TWaver矢量小试——Android演进路线图

还有半个多月就到春节了,年底相信很多公司都会进行年度总结以及公司发展状况总结,在这过程中难免会用到RoadMap,在这我们也使用TWaver的矢量部分绘制一个Android系统的发展历程。先看效果:
android-roadmap
android-roadmap
什么,最里面Android 1.0的气泡看不清?没关系,放大下ok。
android1.0
先来绘制一条road:

twaver.Util.registerImage('road', {
	w: 880,
	h: 370,  			
	origin:{ x: 0, y: 0 },
	v: [{
		shape: 'rect',
		rel: true,
		rect: [ 0, 0, 1, 1],
		lineColor:'red',
		lineWidth: 1,
		visible: debug,
	},{
		shape: 'path',
		data: 'M850,10C50,140,50,160,400,173C900,180,900,205,400,210C0,220,0,250,850,280L850,360C-50,290,-50,200,400,200C850,195,850,190,400,178C40,160,40,135,850,8z',
		fill:'#E3E3E3',
		lineWidth:0,
	}],
});

  

绘制一个bubble,可以添加一些动画:

twaver.Util.registerImage('bubble', {
	w: 100,
	h: 120,  		
	origin:{ x: 0, y: 0 },
	scale: { x: '<%=getClient("scale")%>', y: '<%=getClient("scale")%>' },
	v: [{
		shape: 'rect',
		rel: true,
		rect: [ 0, 0, 1, 1],
		lineColor:'red',
		lineWidth: 1,
		visible: debug,
	},{
		shape: 'path',
		data: 'M50,100Q10,65,10,60C0,50,0,0,50,0C100,0,100,50,90,60Q90,65,50,100',
		fill:'<%=getClient("color")%>',
		lineWidth:0,
		rotate:0,
	},{
		shape: 'circle',
		cx: 49,
		cy: 48,
		r:42,
		startAngle: 180,
		endAngle: 360,
		fill:'#EFEFEF',
		lineWidth:0,
	},{
		shape: 'text',
		text: '<%=getClient("year")%>',
		x:50,
		y:110,
		fill:'white',
		textAlign: 'center',
		textBaseline: 'middle',
		font: '14px "Microsoft Yahei"',
	},{
		shape: 'text',
		text: '<%=getClient("title")%>',
		x:50,
		y:33,
		fill:'black',
		textAlign: 'center',
		textBaseline: 'middle',
		font: '16px "Microsoft Yahei" bold',
	},{
		shape: 'text',
		text: '<%=getClient("description")%>',
		x:50,
		y:60,
		fill:'white',
		textAlign: 'center',
		textBaseline: 'middle',
		font: '10px "Microsoft Yahei"',
	}],
});

  

绘制belt:

belt
再添加年份以及一些文字:

text
这样一个简单的RoadMap就制作完成了,是不是很简单。我们依然可以将矢量+动画相结合制作出更加丰富的RoadMap,后续我们也不断退出一些更加丰富的RoadMap,当然也欢迎您来一试身手,如果有需求,可以邮件联系我们。
jeff.fu@servasoft.com

原文地址:https://www.cnblogs.com/twaver/p/4267474.html