Re: Comparing pixels in an image
Re: Comparing pixels in an image
- Subject: Re: Comparing pixels in an image
- From: John Stiles <email@hidden>
- Date: Wed, 18 Jan 2006 07:36:34 -0800
Sorry, I just double checked and you're right. The webview doesn't have
a regular NSScrollView built in.
(I think this is because of various web features like frames, etc.. A
web page may have multiple sets of scrollbars or none at all.)
It looks like the class for the scrollbars in a web view is
"WebDynamicScrollBarsView" which is not a public API.
Sorry, I'm out of ideas. I'm sure you could use JavaScript to turn off
the scroll bars temporarily. Trying to identify them on a pixel level is
going to be a huge pain in the butt, though.
Eamon Ford wrote:
Hmm, neither of those are working. When I switch to list view, it just
shows the WebView, without an NSScrollView.
On Jan 17, 2006, at 8:51 PM, John Stiles wrote:
Two ways:
- you can use the list view instead of the graphical view. On the
right side of the "Instances" pane there are two tiny icons, one with
four squares and one with horizontal lines. Click the horizontal lines.
- you can access it in the graphical view of IB if you try to make a
connection on the very edge of the web-view area. Not sure why it
works that way, it just does.
Eamon Ford wrote:
But I mean, how do I access it in IB? All I can select is the WebView.
On Jan 17, 2006, at 7:16 PM, John Stiles wrote:
Well, typically you'd make an outlet in IB, like with any other view.
On Jan 17, 2006, at 4:11 PM, Eamon Ford wrote:
Aha, okay. But how do I access the NSScrollView?
On Jan 17, 2006, at 3:13 PM, John Stiles wrote:
The web view is embedded inside an NSScrollView, which is in
charge of the scrollers. You can hide them that way.
On Jan 17, 2006, at 2:50 PM, Eamon Ford wrote:
I have a method that takes a screenshot of a WebView, but I
don't want there to be scroll bars in the screenshot. I don't
see a way to set the WebView to not have scroll bars, without
perhaps subclassing it, so I thought the easiest way would be to
determine if scroll bars show up in the screenshot, and if they
do, cut them out.
I'm rather new to Cocoa, so I might be doing this wrong. Is
there a better way to do this?
On Jan 17, 2006, at 2:43 PM, John C. Randolph wrote:
On Jan 17, 2006, at 1:45 PM, Eamon Ford wrote:
How do I compare the pixels at specified coordinates in an image?
What are you trying to do?
-jcr
John C. Randolph <email@hidden> (408) 914-0013
Roaming Cocoa Engineer,
Available for your projects at great Expense and Inconvenience.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden