当前位置:网站首页>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);
边栏推荐
- 备战金九银十,如何顺利通过互联网大厂Android的笔面试?
- pytroch、tensorflow对比学习—功能组件(数据管道、回调函数、特征列处理)
- 解决ffmpeg使用screen-capture-recorder录屏,有屏幕缩放的情况下录不全的问题
- Pyspark Machine Learning: Vectors and Common Operations
- 7月编程排行榜来啦!这次有何新变化?
- High Numbers | 【Re-integration】Line Area Score 880 Examples
- Selenium:表单切换
- 冲刺金九银十,Android开发面试(内含面试资料|面试题|源码)
- The Principle Of Percona Toolkit Nibble Algorithm
- 【目标检测】YOLOv7理论简介+实践测试
猜你喜欢
56:第五章:开发admin管理服务:9:开发【文件上传到,MongoDB的GridFS中,接口】;(把文件上传到GridFS的SOP)
Progressive Reconstruction of Visual Structure for Image Inpainting 论文笔记
万字逐行解析与实现Transformer,并进行德译英实战(一)
零序电流继电器器JL-8C-12-2-2
typescript23-tuple
状态压缩dp
(2022 Niu Ke Duo School IV) K-NIO's Sword (Thinking)
UE4 制作遇到的问题
C# | 使用Json序列化对象时忽略只读的属性
The difference between scheduleWithFixedDelay and scheduleAtFixedRate
随机推荐
PAT class B 1001 (3n+1) conjecture
Selenium:浏览器操作
In the shake database, I want to synchronize the data of the source db0 to the destination db5, how to set the parameters?
Immutable
零序电流继电器器JL-8C-12-2-2
LeetCode 1189. “气球” 的最大数量
剑指 Offer 68 - II. 二叉树的最近公共祖先
在沈自所的半年总结
Lawyer Interpretation | Guns or Roses?Talking about Metaverse Interoperability from the Battle of Big Manufacturers
typescript27 - what about enumeration types
(2022牛客多校四)A-Task Computing (排序+动态规划)
MySQL-Data Definition Language-DDLdatebase define language
Selenium:操作JS
HJS-DE1/2时间继电器
这里有110+公开的专业数据集
报错:AttributeError: module ‘matplotlib’ has no attribute ‘figure’
y83.第四章 Prometheus大厂监控体系及实战 -- prometheus告警机制进阶(十四)
typescript26 - literal types
Selenium:表单切换
Selenium:下拉框操作