• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSScrollView Resize Problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSScrollView Resize Problems


  • Subject: NSScrollView Resize Problems
  • From: Mike Burns <email@hidden>
  • Date: Tue, 08 May 2007 16:22:03 -0400

Hello all,

I have been struggling for a few days trying to set up an NSOpenGLView inside an NSScrollView for a 2D map editor I've been porting from Windows. I am almost there (thanks entirely to this list) but there is still one nagging problem that I can't seem to figure out:

I am using the NSOpenGLView inside a NSScrollView to display a large rectangular texture (tileset) from which the main map is built. The user is allowed to load in different tilesets (of varying size) at any time.

When a new tileset is requested, I have the following code:

[[ tilesetScrollView documentView ] setFrame: NSMakeRect( 0, 0, width, height ) ];

where width and height are the dimensions of the new tileset. Here is my problem -- in order to get the texture displayed at the top left corner I have subclassed an NSView for use as the documentView and set it as isFlipped and used that to control my NSOopenGLView subclass. For some reason calling that line of code above seems to flip the coordinates back to the original bottom left orientation. (I know this because when I call mouse down the coordinates change once a smaller texture is loaded.)

Does anyone know why it might be doing this?

Thanks!

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: MEETING: Chicago CocoaHeads / CAWUG Tuesday May 8th - Input Fuzzing
  • Next by Date: Binding my custom view to NSArrayController's arrangedObjects (was) not working
  • Previous by thread: Re: How to implement a "Picture Frame" view
  • Next by thread: Binding my custom view to NSArrayController's arrangedObjects (was) not working
  • Index(es):
    • Date
    • Thread