Drawable的setBounds方法
来源:互联网 发布:网络机顶盒看乐视体育 编辑:程序博客网 时间:2024/06/08 06:51
Drawable的setBounds方法有四个参数,setBounds(int left, int top, int right, int bottom),这个四参数指的是drawable将在被绘制在canvas的哪个矩形区域内。
例如
@Override protected void onDraw(Canvas canvas) { drawable.setBounds(100, 100, 500, 500); drawable.draw(canvas); }
上面的代码会将drawable绘制在canvas内部(100,100,500,500)表示的矩形区内(这个矩形区域的坐标是以canvas左上角为坐标原点的)
7 1
- Drawable的setBounds方法
- Drawable setBounds方法
- 不要使用Drawable的setBounds方法来指定其在控件作为背景的显示位置
- Android drawable 的setBounds(0, 5, dip2px(20), dip2px(20)) 方法
- android drawable setBounds()
- android Drawable setbounds()介绍
- android Drawable setbounds()介绍
- android Drawable setbounds()介绍
- 使用setBounds()方法需要注意的地方
- Drawable setBounds()中的rect
- java setPreferredSize和setsize,setLocation,setBounds方法的不同
- java setPreferredSize和setsize,setLocation,setBounds方法的不同
- setBounds
- setBounds
- setBounds方法,与setLayout(null)
- SWT中setBounds/setSize方法失效原因分析
- Android 定义 Color 和 Drawable 的方法
- Bitmap和Drawable互相转换的方法
- [leetcode] 125.Valid Palindrome
- 用ping查看计算机的关于网卡,是否接入路由,是否接入Internet
- 机器学习算法之: 逻辑回归 logistic regression (LR)
- 2015惠普测试4班,加油!Fighting~
- Java Servlet完全教程
- Drawable的setBounds方法
- 【hdu4009】【建模】【有向图的最小生成树】
- 无法解析的外部符号 __imp__curl_easy_init
- 【MFC】根据进程名结束进程学习
- Android打包出错export aborted because fatal lint errors were found
- linq 根据子集合的字段获取父集合(包含父集合下的子集合)
- Android M新特性
- 有 N 个非零且各不相同的整数。请你编一个程序求出它们中有多少对相反数(a 和 -a 为一对相反数)。
- iOS开发小白学习体验-4