From 7df34d108e8d6a32f04cc5e2b30d0a5b136db3f2 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 10 Jan 2008 00:29:32 -0800 Subject: [PATCH] Draw the dimple (though it is upside-down because the Cartesian is flipped) * dimple.png: Dimple image * MacGDBp.xcodeproj: Project updates for the image * Source/BSSplitView.m: ([BSSplitView drawDividerInRect:]): Add the dimple drawing code --- MacGDBp.xcodeproj/project.pbxproj | 4 ++++ Source/BSSplitView.m | 6 ++++++ dimple.png | Bin 0 -> 134 bytes 3 files changed, 10 insertions(+) create mode 100644 dimple.png diff --git a/MacGDBp.xcodeproj/project.pbxproj b/MacGDBp.xcodeproj/project.pbxproj index c7ee7f9..257880b 100644 --- a/MacGDBp.xcodeproj/project.pbxproj +++ b/MacGDBp.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ 1EEBFC2B0D358EBD008F835B /* StepIn.png in Resources */ = {isa = PBXBuildFile; fileRef = 1EEBFC2A0D358EBD008F835B /* StepIn.png */; }; 1EEBFC370D358F1B008F835B /* StepOut.png in Resources */ = {isa = PBXBuildFile; fileRef = 1EEBFC360D358F1B008F835B /* StepOut.png */; }; 1EEBFD090D3599E8008F835B /* BSSplitView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEBFD070D3599E8008F835B /* BSSplitView.m */; }; + 1EEBFD120D359A9F008F835B /* dimple.png in Resources */ = {isa = PBXBuildFile; fileRef = 1EEBFD110D359A9F008F835B /* dimple.png */; }; 1EEEE9400C618B70000C0732 /* SocketWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 1EEEE93F0C618B70000C0732 /* SocketWrapper.m */; }; 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; }; 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; @@ -47,6 +48,7 @@ 1EEBFC360D358F1B008F835B /* StepOut.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = StepOut.png; path = Icons/StepOut.png; sourceTree = ""; }; 1EEBFD070D3599E8008F835B /* BSSplitView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BSSplitView.m; path = Source/BSSplitView.m; sourceTree = ""; }; 1EEBFD080D3599E8008F835B /* BSSplitView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BSSplitView.h; path = Source/BSSplitView.h; sourceTree = ""; }; + 1EEBFD110D359A9F008F835B /* dimple.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = dimple.png; sourceTree = ""; }; 1EEEE93E0C618B70000C0732 /* SocketWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SocketWrapper.h; path = Source/SocketWrapper.h; sourceTree = ""; }; 1EEEE93F0C618B70000C0732 /* SocketWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SocketWrapper.m; path = Source/SocketWrapper.m; sourceTree = ""; }; 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -143,6 +145,7 @@ 29B97317FDCFA39411CA2CEA /* Resources */ = { isa = PBXGroup; children = ( + 1EEBFD110D359A9F008F835B /* dimple.png */, 1EEBFC360D358F1B008F835B /* StepOut.png */, 1EEBFC2A0D358EBD008F835B /* StepIn.png */, 1EEBFBE30D34C793008F835B /* Debugger.xib */, @@ -213,6 +216,7 @@ 1EEBFBE50D34C793008F835B /* Debugger.xib in Resources */, 1EEBFC2B0D358EBD008F835B /* StepIn.png in Resources */, 1EEBFC370D358F1B008F835B /* StepOut.png in Resources */, + 1EEBFD120D359A9F008F835B /* dimple.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Source/BSSplitView.m b/Source/BSSplitView.m index 1de28b6..393da05 100644 --- a/Source/BSSplitView.m +++ b/Source/BSSplitView.m @@ -38,6 +38,12 @@ [stroke setStroke]; [NSBezierPath setDefaultLineWidth:0.5]; [NSBezierPath strokeRect:rect]; + + // draw the dimple + NSImage *dimple = [NSImage imageNamed:@"dimple.png"]; + NSSize imgSize = [dimple size]; + NSRect dimpleRect = NSMakeRect((rect.size.width / 2) - (imgSize.width / 2) + rect.origin.x, (rect.size.height / 2) - (imgSize.height / 2) + rect.origin.y, imgSize.width, imgSize.height); + [dimple drawInRect:dimpleRect fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0]; } /** diff --git a/dimple.png b/dimple.png new file mode 100644 index 0000000000000000000000000000000000000000..284e65bfc1be003b1e54c90a89e5417fa0bf0e9b GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^EFjFm1SHiab7}%9&H|6fVg?3oVGw3ym^DWNC}`p7 z;uyj)ll9<2UIqgWhJ*P*&BqgWvHa$5P|@H?R;VsFGFD