当前位置:网站首页>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);
边栏推荐
- typescript27 - what about enumeration types
- 零序电流继电器器JL-8C-12-2-2
- pytroch、tensorflow对比学习—使用GPU训练模型
- scheduleWithFixedDelay和scheduleAtFixedRate的区别
- USB3.0:VL817Q7-C0的LAYOUT指南(二)
- typescript28-枚举类型的值以及数据枚举
- LeetCode 387. 字符串中的第一个唯一字符
- Immutable
- (2022 Nioke Duo School IV) H-Wall Builder II (Thinking)
- 在互联网时代,有诸多「互联网+」模式的诞生
猜你喜欢

Visual Studio提供的 Command Prompt 到底有啥用

Typescript20 - interface

PAT serie b write the number 1002

USB3.0:VL817Q7-C0的LAYOUT指南(三)

初识shell脚本

MySQL-Data Definition Language-DDLdatebase define language

I met a shell script

JWL-11/2-99.9A电流继电器

Swastika line-by-line parsing and realization of the Transformer, and German translation practice (a)

可持久化线段树
随机推荐
风险策略调优中重要的三步分析法
初识shell脚本
李迟2022年7月工作生活总结
(Codeforce 757)E. Bash Plays with Functions(积性函数)
SL-12/2过流继电器
pytroch、tensorflow对比学习—搭建模型范式(低阶、中阶、高阶API示例)
请问shake数据库中想把源的db0的数据同步到目的db5,参数怎么设置呢?
(2022牛客多校四)H-Wall Builder II(思维)
PaddleX部署推理模型和GUI界面测试结果不一致的解决方法
Selenium:元素判断
类神经网络训练不起来怎么办
Excel做题记录——整数规划优化模型
USB3.0:VL817Q7-C0的LAYOUT指南(二)
Swastika line-by-line parsing and realization of the Transformer, and German translation practice (2)
typescript27-枚举类型呢
数组问题之《下一个排列》、《旋转图像》以及二分查找之《搜索二维矩阵》
Selenium:上传、下载文件
剑指 Offer 68 - II. 二叉树的最近公共祖先
【目标检测】YOLOv7理论简介+实践测试
typescript23-元组