feat: wire canvas HSL and spider editors, face support and lens repair (validation pending)

这个提交包含在:
mac 于 2026-11-05 01:28:18 +08:00 提交
1 父节点 e2aa0bd9a1
当前提交 a3bd2ceb26
19 个文件已更改
+245 -43

没有与搜索条件相匹配的文件

+5 -5
查看文件
@@ -31,11 +31,11 @@ static const NSInteger DYViewerPartBase=20000;
for(DYViewerParameterPanel*p in [[_panels copy]autorelease]){if(!p.visible){if(p==_capture){[p finishCapture];_capture=nil;}p.bridge=nil;[_panels removeObjectIdenticalTo:p];continue;}[p setViewport:v];[p prepareWithSize:size scale:s atTime:time];}
if(_capture&&![_capture capturing])_capture=nil;
[_areas removeAllObjects];if(!_bridge||v.size.width<100||v.size.height<80)return;
NSInteger cap=MAX(1,MIN(14,(NSInteger)floor((v.size.height-72*s)/(30*s))));if(cap<14)cap=MAX(1,MIN(13,(NSInteger)floor((v.size.height-96*s)/(30*s))));NSInteger pages=(14+cap-1)/cap;_railPage=MAX(0,_railPage)%pages;
NSInteger toolCount=DYToolTypes().count;NSInteger cap=MAX(1,MIN(toolCount,(NSInteger)floor((v.size.height-72*s)/(30*s))));if(cap<toolCount)cap=MAX(1,MIN(toolCount-1,(NSInteger)floor((v.size.height-96*s)/(30*s))));NSInteger pages=(toolCount+cap-1)/cap;_railPage=MAX(0,_railPage)%pages;
CGFloat x=NSMinX(v)+8*s,y=NSMinY(v)+8*s,w=40*s;
_rail=NSMakeRect(x,y,w,(30*MIN(cap,14-_railPage*cap)+54+(pages>1?24:0))*s);
NSArray*titles=@[@"一级",@"蜘蛛",@"基础",@"肤色",@"LUT",@"HSL",@"曲线",@"分级",@"原色",@"色阶",@"黑白",@"平衡",@"通道",@"胶片"];
for(NSInteger j=0;j<cap&&j+_railPage*cap<14;j++){NSInteger i=j+_railPage*cap;[_areas addObject:@{@"part":@(20020+i),@"kind":@"tool",@"toolType":DYToolTypes()[i],@"title":titles[i],@"rect":[NSValue valueWithRect:NSMakeRect(x+4*s,y+5*s+j*30*s,w-8*s,26*s)]}];}
_rail=NSMakeRect(x,y,w,(30*MIN(cap,toolCount-_railPage*cap)+54+(pages>1?24:0))*s);
NSArray*titles=@[@"一级",@"蜘蛛",@"基础",@"肤色",@"LUT",@"HSL",@"曲线",@"分级",@"原色",@"色阶",@"黑白",@"平衡",@"通道",@"胶片",@"畸变"];
for(NSInteger j=0;j<cap&&j+_railPage*cap<toolCount;j++){NSInteger i=j+_railPage*cap;[_areas addObject:@{@"part":@(20020+i),@"kind":@"tool",@"toolType":DYToolTypes()[i],@"title":titles[i],@"rect":[NSValue valueWithRect:NSMakeRect(x+4*s,y+5*s+j*30*s,w-8*s,26*s)]}];}
CGFloat end=NSMaxY(_rail)-47*s;if(pages>1){[_areas addObject:@{@"part":@20003,@"kind":@"railPage",@"title":@"↕",@"rect":[NSValue valueWithRect:NSMakeRect(x+4*s,end-24*s,w-8*s,22*s)]}];}
[_areas addObject:@{@"part":@20001,@"kind":@"workspace",@"title":@"◫",@"rect":[NSValue valueWithRect:NSMakeRect(x+4*s,end,w-8*s,26*s)]}];
[_areas addObject:@{@"part":@20002,@"kind":@"hidePanels",@"title":@"收",@"rect":[NSValue valueWithRect:NSMakeRect(x+4*s,end+27*s,w-8*s,18*s)]}];
@@ -59,7 +59,7 @@ static const NSInteger DYViewerPartBase=20000;
}
- (void)activateTool:(NSString*)type{
for(DYViewerParameterPanel*p in [[_panels copy]autorelease])if([p.toolType isEqual:type]){[p finishCapture];p.bridge=nil;[_panels removeObjectIdenticalTo:p];return;}
DYViewerParameterPanel*p=[[[DYViewerParameterPanel alloc]init]autorelease];p.toolType=type;p.bridge=_bridge;
[_bridge requestTool:type];DYViewerParameterPanel*p=[[[DYViewerParameterPanel alloc]init]autorelease];p.toolType=type;p.bridge=_bridge;
CGFloat x=(_rail.size.width+24*_scale)/MAX(1.,_viewport.size.width),offset=(_panels.count%4)*22*_scale;
[p setInitialPosition:NSMakePoint(x+offset/MAX(1.,_viewport.size.width),(8*_scale+offset)/MAX(1.,_viewport.size.height))];[_panels addObject:p];
}