当前位置:网站首页>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);
边栏推荐
- The difference between scheduleWithFixedDelay and scheduleAtFixedRate
- UE4 模型OnClick事件不生效的两种原因
- Excel record of integer programming optimization model to solve the problem
- 初识shell脚本
- 「以云为核,无感极速」顶象第五代验证码
- Swastika line-by-line parsing and realization of the Transformer, and German translation practice (a)
- 华为Android开发面试后得出的面试秘诀
- Immutable
- pytroch、tensorflow对比学习—搭建模型范式(低阶、中阶、高阶API示例)
- typescript20-接口
猜你喜欢
随机推荐
SL-12/2过流继电器
Error: AttributeError: module 'matplotlib' has no attribute 'figure'
律师解读 | 枪炮还是玫瑰?从大厂之争谈元宇宙互操作性
typescript25-类型断言
typescript21 - Comparison of Interfaces and Type Aliases
万字逐行解析与实现Transformer,并进行德译英实战(一)
PAT class B 1001 (3n+1) conjecture
PAT serie b write the number 1002
API设计笔记:pimpl技巧
数组问题之《下一个排列》、《旋转图像》以及二分查找之《搜索二维矩阵》
Typescript22 - interface inheritance
The method of solving stored procedure table name passing through variable in mysql
typescript26 - literal types
冲刺金九银十,Android开发面试(内含面试资料|面试题|源码)
4D line-by-line analysis and implementation of Transformer, and German translation into English (3)
Logitech Mouse Experience Record
UE4 从鼠标位置射出射线检测
Swastika line-by-line parsing and realization of the Transformer, and German translation practice (2)
C# | 使用Json序列化对象时忽略只读的属性
零序电流继电器器JL-8C-12-2-2









