Draw a portable clone stamp glyph for the formal host
这个提交包含在:
1 父节点
ca8a5433d3
当前提交
9977b5c41b
3 个文件已更改
+20
-3
没有与搜索条件相匹配的文件
@@ -20,6 +20,22 @@ static void DYDrawDistortionGrid(NSRect rect,NSColor *color){
|
||||
}
|
||||
[color setStroke];[grid stroke];
|
||||
}
|
||||
static void DYDrawCloneStamp(NSRect rect,NSColor *color){
|
||||
CGFloat side=NSWidth(rect),x=NSMinX(rect),y=NSMinY(rect);
|
||||
NSBezierPath *handle=[NSBezierPath bezierPathWithRoundedRect:NSMakeRect(x+side*.31,y+side*.05,side*.38,side*.43) xRadius:side*.16 yRadius:side*.16];
|
||||
NSBezierPath *body=[NSBezierPath bezierPath];
|
||||
[body moveToPoint:NSMakePoint(x+side*.39,y+side*.31)];
|
||||
[body lineToPoint:NSMakePoint(x+side*.61,y+side*.31)];
|
||||
[body lineToPoint:NSMakePoint(x+side*.72,y+side*.55)];
|
||||
[body lineToPoint:NSMakePoint(x+side*.88,y+side*.55)];
|
||||
[body lineToPoint:NSMakePoint(x+side*.91,y+side*.78)];
|
||||
[body lineToPoint:NSMakePoint(x+side*.09,y+side*.78)];
|
||||
[body lineToPoint:NSMakePoint(x+side*.12,y+side*.55)];
|
||||
[body lineToPoint:NSMakePoint(x+side*.28,y+side*.55)];
|
||||
[body closePath];
|
||||
[color setFill];[handle fill];[body fill];
|
||||
[[NSBezierPath bezierPathWithRoundedRect:NSMakeRect(x+side*.10,y+side*.86,side*.80,side*.09) xRadius:side*.045 yRadius:side*.045]fill];
|
||||
}
|
||||
@interface DYViewerControls : NSObject
|
||||
@property(nonatomic,retain) DYViewerParameterBridge *bridge;
|
||||
- (void)setViewport:(NSRect)viewport;
|
||||
@@ -53,7 +69,7 @@ NSRect bounds=NSMakeRect(0,0,size.width,size.height),v=_hasViewport?NSIntersecti
|
||||
if(_capture&&![_capture capturing])_capture=nil;
|
||||
[_areas removeAllObjects];if(!_bridge||v.size.width<100||v.size.height<80)return;
|
||||
// Only tools that benefit from direct image interaction belong on the canvas.
|
||||
NSArray *types=@[@"curve",@"lens",@"skin",@"look",@"whiteBalance",@"cloneStamp"],*titles=@[@"曲线",@"畸变修复",@"肤色",@"LUT",@"白平衡吸管",@"仿制图章"],*symbols=@[@"point.topleft.down.to.point.bottomright.curvepath",@"pincushion-grid",@"person.crop.circle",@"square.stack.3d.up",@"eyedropper",@"stamp"];
|
||||
NSArray *types=@[@"curve",@"lens",@"skin",@"look",@"whiteBalance",@"cloneStamp"],*titles=@[@"曲线",@"畸变修复",@"肤色",@"LUT",@"白平衡吸管",@"仿制图章"],*symbols=@[@"point.topleft.down.to.point.bottomright.curvepath",@"pincushion-grid",@"person.crop.circle",@"square.stack.3d.up",@"eyedropper",@"clone-stamp"];
|
||||
CGFloat railScale=MIN(s,v.size.width/480.),y=NSMaxY(v)-33*railScale,w=36*railScale;
|
||||
CGFloat x=NSMaxX(v)-476*railScale;
|
||||
_rail=NSMakeRect(x,y,356*railScale,25*railScale);
|
||||
@@ -104,6 +120,7 @@ NSRect bounds=NSMakeRect(0,0,size.width,size.height),v=_hasViewport?NSIntersecti
|
||||
CGFloat side=MIN(17*s,r.size.height*.7);
|
||||
NSRect glyph=NSMakeRect(NSMidX(r)-side/2,NSMidY(r)-side/2,side,side);
|
||||
if([a[@"symbol"]isEqual:@"pincushion-grid"])DYDrawDistortionGrid(NSInsetRect(glyph,1,1),ink);
|
||||
else if([a[@"symbol"]isEqual:@"clone-stamp"])DYDrawCloneStamp(glyph,ink);
|
||||
else{
|
||||
NSImage *icon=[NSImage imageWithSystemSymbolName:a[@"symbol"] accessibilityDescription:a[@"title"]];
|
||||
NSImageSymbolConfiguration *configuration=[[NSImageSymbolConfiguration configurationWithPointSize:14*s weight:NSFontWeightRegular]configurationByApplyingConfiguration:[NSImageSymbolConfiguration configurationWithPaletteColors:@[ink]]];
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.13.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>82</string>
|
||||
<string>83</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string></string>
|
||||
<key>PlugInKit</key>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.13.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>82</string>
|
||||
<string>83</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
|
||||
在新工单中引用
屏蔽一个用户