android 绘图基础 内含各种基本api
2016-11-06 22:37
387 查看
canvas.drawPoint(x,y,paint);//绘制点 canvas.drawLine(startX,startY,endX,endY);//绘制直线 float[] pts={ startX1,startY1,endX1,endY1 ....... startXn.startYn.endXn.endYn } canvas,drawLines(pts,paint);//绘制多条直线 canvas.drawRect(left,top,right,botttom.paint);//绘制矩形 canvas,drawCircle(circleX,circleY,radius,paint);//绘制圆 //绘制弧形和扇形 包括实心和空心 paint.setStyle(Paint.Style.STROKE); paint.drawArc(left,top,right,bottom,startAngle,sweepAngle,userCenter,paint); //如下参数组合 Paint.Style.STROKE+useCenter(true) //扇形 Paint.Style.STTOKE+userCenter(false);//弧形 Paint.Style.FILL+userCenter(true);//实心扇形 Paint.Style.FILL+userCenter(false)//实心弧形 canvas.drawOval(left,top,right,bottom,paint);//椭圆 canvas.drawText(text,startX,startY,paint);//绘制文本 canvas.drawPosTexr(text,new float[]{x1,y1,...,Xn,Yn},paint);//在指定位置绘制文本 //绘制路径 Path path=new Path(); path.moveTo(50,50); path.lineTo(100,100); path.lineTo(100,300); path.lineTo(100,50); canvas.drawPath(path,paint);
相关文章推荐
- android 绘图基础 内含各种基本api
- android 绘图基础 内含各种基本api
- android 绘图基础 内含各种基本api
- android 绘图基础 内含各种基本api
- android 绘图基础 内含各种基本api
- android 绘图基础 内含各种基本api
- android 绘图基础 内含各种基本api
- android 绘图基础 内含各种基本api
- java基础 ---AWT中基本的绘图API
- android基础笔记:android中的各种基本对话框
- 【Android基础笔记02】 API Guide学习和常用布局及基本UI控件
- Android中继承View的研究(二) -- 绘图的基本知识
- Android_UI开发专题之绘图基础
- Android OpenGL ES 简明开发教程三:3D绘图基本概念
- android 各种基本手势
- Rexsee API介绍:Android定时任务Alarm,附基本的闹钟功能示例
- Android UI开发专题(二) 之绘图基础
- Andriod编程基础(三):Android UI 基本常用组件实例
- Android Google Map API 开发基础知识
- Android Google Map API 开发基础知识