Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Feb 9, 2006, 11:41 AM   #1
harveypooka
macrumors 65816
 
Join Date: Feb 2004
Advice please - image, opacity quest

Hello,
I'm no programmer - I have a book on Cocoa that I still haven't read, but will soon! I want to make some kind of program (or extension?) that'll allow me to display an image on a monitor with varying levels of opacity (user defined) that will just lay over the top of anything/everything. So, I'm doing a word document and want view an image of my cat or a landscape in the background, but not in the background - just overlayed on the screen that can only be modified via it's icon in the dock/system panel. Any ideas where to start?! Thanks!
harveypooka is offline   0 Reply With Quote
Old Feb 9, 2006, 03:56 PM   #2
HiRez
macrumors 601
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
Quote:
Originally Posted by harveypooka
I want to make some kind of program (or extension?) that'll allow me to display an image on a monitor with varying levels of opacity (user defined) that will just lay over the top of anything/everything. So, I'm doing a word document and want view an image of my cat or a landscape in the background, but not in the background - just overlayed on the screen that can only be modified via it's icon in the dock/system panel.
You can just make a borderless NSWindow with NSBorderlessWindowMask, set your image view to be the contents of the window, set the window as top level with perhaps [myWindow setLevel: NSPopUpMenuWindowLevel] (I don't think it'll let you set a semi-opaque, non-fullscreen window to NSScreenSaverWindowLevel, which is the highest, but I'm not sure about that), then just adjust the window opacity with [myWindow setAlphaValue:<whatever {0.0 .. 1.0}>]. Setting up the basics including loading an image is probably no more than a dozen or so lines of code. Can't help you with the Dock/System Panel stuff but it's probably not that complicated.
__________________
Go outside, the graphics are amazing!
HiRez is offline   0 Reply With Quote
Old Feb 9, 2006, 03:58 PM   #3
harveypooka
Thread Starter
macrumors 65816
 
Join Date: Feb 2004
Excellent. Once I figure out what that means I'll give it a go!
harveypooka is offline   0 Reply With Quote
Old Feb 9, 2006, 06:21 PM   #4
HiRez
macrumors 601
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
OK so I was bored and made a mockup of your app, which is attached to this message (app + source code in a .zip file, ~83k). It's a few more lines of code than I thought, but not too much really. Anything like what you are looking for? As I said, I don't really know much about Dock control or System Prefs panels.

FTW 1.01a .zip
__________________
Go outside, the graphics are amazing!
HiRez is offline   0 Reply With Quote
Old Feb 9, 2006, 06:42 PM   #5
harveypooka
Thread Starter
macrumors 65816
 
Join Date: Feb 2004
Dude, that's ace! What did you make this in and how tough was it to do? My last experience of looking at programs was er...ResEdit. And that's just pulling stuff apart. Ooo, I'm skilled me! That's exactly what I had in mind! Do you mind if I modify it slightly?
harveypooka is offline   0 Reply With Quote
Old Feb 9, 2006, 09:03 PM   #6
HiRez
macrumors 601
 
HiRez's Avatar
 
Join Date: Jan 2004
Location: Western US
Quote:
Originally Posted by harveypooka
Dude, that's ace! What did you make this in and how tough was it to do? My last experience of looking at programs was er...ResEdit. And that's just pulling stuff apart. Ooo, I'm skilled me! That's exactly what I had in mind! Do you mind if I modify it slightly?
No, I don't mind if you modify it, the source code is there for you to dismantle and modify and do whatever you want with...glad if it'll help you! It's all Objective-C/Cocoa in an Xcode project, just install the developer tools from the Tiger disk first, then download the latest Xcode update from Apple (2.2.1), then open the project (FTW.xcodeproj). It wasn't that hard to do, probably took me an hour and a half or so.

EDIT: Oh, and it turns out you can set the window level to NSScreenSaverWindowLevel, but if you do that you won't even see things like alt-tabbed overlays, so I backed it off one level for safety. I really think Apple discourages putting things at that level that aren't screen savers or full-screen exclusive apps.
__________________
Go outside, the graphics are amazing!

Last edited by HiRez; Feb 9, 2006 at 09:09 PM.
HiRez is offline   0 Reply With Quote
Old Feb 10, 2006, 12:28 AM   #7
live4ever
macrumors 6502a
 
Join Date: Aug 2003
Location: Thunder Bay, ON
I've been using an app like this called Photostickies.
http://www.devonthink.com/products/s.../shareware.php
live4ever is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Can the opacity of the task bar be changed? Tikatika iOS 7 9 Sep 18, 2013 03:56 PM
Going in again for image retention. Advice? benguild MacBook Pro 12 Jun 20, 2013 02:30 AM
Opacity of a dropdown menu Brendon Bauer Web Design and Development 8 Jan 8, 2013 03:58 PM
iDraw Opacity MacBook Pro"ish Mac Applications and Mac App Store 0 Nov 20, 2012 11:19 AM
Menu Bar Opacity bitsoda OS X 10.8 Mountain Lion 2 Jun 12, 2012 07:01 PM

Forum Jump

All times are GMT -5. The time now is 09:05 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC