Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bilt HIView to Offscreen bitmap



> Eric Schlegel wrote:
> 
> Jeff Sparks wrote:
> 
> > Unfortunately, I still have the same problem when I replace my code
> > with the two functions provided in link: an all-white bitmap (255 255
> > 255 ...) instead of the window's contents.
> 
> Sounds like you're getting the drawing of the window content view,  
> but not of anything embedded inside it. What other views do you have  
> in this window?
> 

There are three views: root view, content view, and web view, which
are set up per /Developer/Examples/WebKit/SimpleCarbonWeb/WebWindow.m,

        CFURLRef                url;
        WindowRef               window;
        OSStatus                err;
        IBNibRef                nibRef;
        HIViewRef               webView, contentView, root;
        HIRect                  bounds;
		        
        // ...

        HIWebViewCreate( &webView );
        
        HIViewFindByID( HIViewGetRoot( window ), 
                        kHIViewWindowContentID, 
                        &contentView );
        HIViewGetBounds( contentView, &bounds );
        HIViewSetFrame( webView, &bounds );
        
        GetRootControl( window, &root );
        HIViewAddSubview( root, webView );
        HIViewSetVisible( webView, true );

I've been using the content view.  The bitmap bits are untouched when
I blit the root view or the web view (this is what I misremembered in
my first email).  For the content view, the bits are set to all-white.

Incidentally, the width and height of the root view are zero until I
call HIViewSetFrame() on it.  This is only relevant if I want to blit
the root view; otherwise, a zero-sized root view doesn't seem to
matter either way.

-jeff


 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Bilt HIView to Offscreen bitmap (From: Eric Schlegel <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.