当前位置:网站首页>Use controls as brushes to get bitmap code records
Use controls as brushes to get bitmap code records
2022-08-01 05:07:00 【trace,】
int width = 1000;
int height = 1000;
TextView textView = new TextView(context);
Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.RGB_565);
Canvas canvas = new Canvas(bitmap);
textView.setText(“123”);
textView.setBackgroundColor(Color.YELLOW);
textView.setGravity(Gravity.CENTER);
textView.layout(0, 0, width, height);
textView.measure(View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY),
View.MeasureSpec.makeMeasureSpec(height, View.MeasureSpec.EXACTLY));
textView.draw(canvas);
边栏推荐
- typescript28 - value of enumeration type and data enumeration
- Power button (LeetCode) 212. The word search II (2022.07.31)
- 在沈自所的半年总结
- 万字逐行解析与实现Transformer,并进行德译英实战(二)
- Lawyer Interpretation | Guns or Roses?Talking about Metaverse Interoperability from the Battle of Big Manufacturers
- 备战金九银十,如何顺利通过互联网大厂Android的笔面试?
- MySQL-数据定义语言-DDLdatebase define language
- 律师解读 | 枪炮还是玫瑰?从大厂之争谈元宇宙互操作性
- UE4 从鼠标位置射出射线检测
- (2022牛客多校四)D-Jobs (Easy Version)(三维前缀或)
猜你喜欢
Lawyer Interpretation | Guns or Roses?Talking about Metaverse Interoperability from the Battle of Big Manufacturers
typescript23-tuple
PAT serie b write the number 1002
2022/07/29 入职健海JustFE团队,我学到了高效开发(年中总结)
7月编程排行榜来啦!这次有何新变化?
II. Binary tree to Offer 68 - recent common ancestor
pytroch、tensorflow对比学习—专栏介绍
DL-31/6电流继电器
程序员代码面试指南 CD15 生成窗口最大值数组
typescript26-字面量类型
随机推荐
Selenium:表单切换
在沈自所的半年总结
李迟2022年7月工作生活总结
Selenium:弹窗处理
类神经网络训练不起来怎么办
Selenium:浏览器操作
Visual Studio提供的 Command Prompt 到底有啥用
typescript24 - type inference
Selenium:操作Cookie
请求/响应拦截器写法
备战金九银十,如何顺利通过互联网大厂Android的笔面试?
PaddleX部署推理模型和GUI界面测试结果不一致的解决方法
用控件当画笔获得bitmap代码记录
数据比对功能调研总结
图片更新之后Glide加载依旧是原来的图片问题
数组问题之《下一个排列》、《旋转图像》以及二分查找之《搜索二维矩阵》
typescript21 - Comparison of Interfaces and Type Aliases
风险策略调优中重要的三步分析法
【目标检测】YOLOv7理论简介+实践测试
数组问题之《两数之和》以及《三数之和 》