Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
pidan
/
FuSiLive
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
591b10a1
authored
Jul 11, 2024
by
pierce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成在线等级图片修改
parent
8cb6b767
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
18 deletions
FuSiLive/Classes/NewLive/Main/Other/FormatContent/FUSFormatContentHelper.m
FuSiLive/Classes/NewLive/Main/Other/FormatContent/FUSFormatContentHelper.m
View file @
591b10a1
...
...
@@ -459,15 +459,15 @@
+
(
void
)
fus_createLevelImgs
{
// NSString *document = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject] stringByAppendingString:@"/ATest"];
// [FUSFileHelper createDirectoryAtPath:document];
//
//
// for (NSInteger i = 1; i <= 99;i++) {
// NSString *filePath = [document stringByAppendingPathComponent:[NSString stringWithFormat:@"fus_time_level_%zd.png",i]];
//
//
// if (![FUSFileHelper fus_isExistFileAtPath:filePath]) {
// CGFloat width = 20;
//
//
// /// 生成等级图片。保存在本地,然后再将路径加入HTML里面
// UILabel *timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(
0, 0, width
, 14)];
// UILabel *timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(
4, 0, 20
, 14)];
// timeLabel.text = @(i).stringValue;
// timeLabel.backgroundColor = [UIColor colorWithWhite:1 alpha:0.32];
// timeLabel.textColor = [UIColor whiteColor];
...
...
@@ -475,28 +475,26 @@
// timeLabel.layer.cornerRadius = 7;
// timeLabel.textAlignment = NSTextAlignmentCenter;
// timeLabel.layer.masksToBounds = YES;
//
// UIGraphicsBeginImageContextWithOptions(
timeLabel.bounds.size
, NO, [UIScreen mainScreen].scale);
// [timeLabel drawViewHierarchyInRect:timeLabel.
bounds
afterScreenUpdates:YES];
//
// UIGraphicsBeginImageContextWithOptions(
CGSizeMake(28, 14)
, NO, [UIScreen mainScreen].scale);
// [timeLabel drawViewHierarchyInRect:timeLabel.
frame
afterScreenUpdates:YES];
// UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext();
// UIGraphicsEndImageContext();
//
//
// if (screenImage) {
// NSData *imageData = UIImagePNGRepresentation(screenImage);
// [FUSFileHelper fus_writeDataToFile:imageData filePath:filePath];
// }
// }
// }
//
//
//
//
// for (NSInteger i = 1; i <= 99;i++) {
// NSString *filePath = [document stringByAppendingPathComponent:[NSString stringWithFormat:@"fus_time_gray_level_%zd.png",i]];
//
//
// if (![FUSFileHelper fus_isExistFileAtPath:filePath]) {
// CGFloat width = 20;
//
// /// 生成等级图片。保存在本地,然后再将路径加入HTML里面
// UILabel *timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(
0, 0, width
, 14)];
// UILabel *timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(
4, 0, 20
, 14)];
// timeLabel.text = @(i).stringValue;
// timeLabel.backgroundColor = [UIColor colorWithHex:@"#D6D6D7"];
// timeLabel.textColor = [UIColor whiteColor];
...
...
@@ -504,12 +502,12 @@
// timeLabel.layer.cornerRadius = 7;
// timeLabel.textAlignment = NSTextAlignmentCenter;
// timeLabel.layer.masksToBounds = YES;
//
// UIGraphicsBeginImageContextWithOptions(
timeLabel.bounds.size
, NO, [UIScreen mainScreen].scale);
// [timeLabel drawViewHierarchyInRect:timeLabel.
bounds
afterScreenUpdates:YES];
//
// UIGraphicsBeginImageContextWithOptions(
CGSizeMake(28, 14)
, NO, [UIScreen mainScreen].scale);
// [timeLabel drawViewHierarchyInRect:timeLabel.
frame
afterScreenUpdates:YES];
// UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext();
// UIGraphicsEndImageContext();
//
//
// if (screenImage) {
// NSData *imageData = UIImagePNGRepresentation(screenImage);
// [FUSFileHelper fus_writeDataToFile:imageData filePath:filePath];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment