• 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
NSImage gets distorted when scrolled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSImage gets distorted when scrolled


  • Subject: NSImage gets distorted when scrolled
  • From: Ron Ballesteros <email@hidden>
  • Date: Sat, 2 Oct 2004 20:40:11 -0700

I'm working on a small app that has a custom view and I'm currently running into a problem with my NSImage that I draw in the custom view.
The problem that I am having is that when I resize the window and scroll the image that is drawn which is a jpg file, the image gets stretch or smeared (not quite sure of the best way to describe it) in the direction that I scroll.

I searched the archives and I couldn't find anything regarding my said problem. Most of what I found was regarding scrolling when an image is resized.
I haven't dealt a lot with NSImage or CustomViews but below is my testing code.

NSPoint mapPoint = NSMakePoint(0, [mapImage size].height);


if (mapImage) {
[mapImage compositeToPoint: mapPoint operation: NSCompositeSourceOver];
}


// Constructing the path
NSBezierPath *hotSpots = [NSBezierPath bezierPath];
[[NSColor redColor] set];


// Draw some random hot spot points over the map Image for Test
NSArray * hotSpotPoints = [hotSpotList objectAtIndex: spotIndex];
for (j=0; j< [hotSpotPoints count]; j++) {
NSPoint hotSpotPoint = NSPointFromString([hotSpotPoints objectAtIndex: j]);
NSRect hotCenter = NSMakeRect(hotSpotPoint.x, hotSpotPoint.y, 5, 5);
[hotSpots appendBezierPathWithOvalInRect: hotCenter];
[hotSpots stroke];
[hotSpots fill];
}

I would appreciate any pointers to the right direction.

Thanks.
ron _______________________________________________
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
  • Follow-Ups:
    • Re: NSImage gets distorted when scrolled
      • From: Allan Odgaard <email@hidden>
  • Prev by Date: Re: NSTextView crashes with web content
  • Next by Date: Re: MVC paradigm: multiple controllers?
  • Previous by thread: Re: NSTextView crashes with web content
  • Next by thread: Re: NSImage gets distorted when scrolled
  • Index(es):
    • Date
    • Thread