Re: Problem in the creation of Graphics context(NSGraphicsContext)

2020-03-11 Thread Sravan Kumar Lakkimsetti via Cocoa-dev
Thank you for your suggestions. It turned out the problem is in the handling of transparency in the newly created imageRep. Now I removed special handling of transparency and relying on the cocoa directly. Thanks for your help - Sravan On Mon, Mar 9, 2020 at 7:21 PM Richard Charles wrote: > >

Re: Problem in the creation of Graphics context(NSGraphicsContext)

2020-03-09 Thread Richard Charles via Cocoa-dev
I do not know Java at all but my guess is that when createImageRep is called the second time the new graphics context does not replace the static one saved during the first execution. --Richard Charles > On Mar 9, 2020, at 3:59 AM, Sravan Kumar Lakkimsetti > wrote: > > If some one wants to

Re: Problem in the creation of Graphics context(NSGraphicsContext)

2020-03-09 Thread Sravan Kumar Lakkimsetti via Cocoa-dev
Hi, Thank you for the reply. We use Java jni to call cocoa api. Here is the pseudo code when we drag the display to another display(non retina) 1. Get imageRep(non retina) from existing NSImage object 2. In our code we have only one image rep at any point of time, we will not have

RE: Re: Problem in the creation of Graphics context(NSGraphicsContext)

2020-03-04 Thread sravan.lakkimsetti--- via Cocoa-dev
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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:

Re: Problem in the creation of Graphics context(NSGraphicsContext)

2020-03-04 Thread David Duncan via Cocoa-dev
You’ll need to explain how you are creating the NSBitmapImageRep (what methods your calling, what parameters your passing, etc) that you pass to this method before anyone can explain why this might be going wrong for you. > On Mar 3, 2020, at 10:19 PM, Sravan Kumar Lakkimsetti via Cocoa-dev >

Re: Problem in the creation of Graphics context(NSGraphicsContext)

2020-03-04 Thread Richard Charles via Cocoa-dev
I have a very similar setup. I tried the following. NSBundle *bundle = [NSBundle mainBundle]; NSData *data = [NSData dataWithContentsOfFile:[bundle pathForResource:@"AAScreenShot" ofType:@"jpg"]]; NSBitmapImageRep *imageRep = [NSBitmapImageRep imageRepWithData:data]; NSGraphicsContext *context =

Problem in the creation of Graphics context(NSGraphicsContext)

2020-03-03 Thread Sravan Kumar Lakkimsetti via Cocoa-dev
Hi, In our product we use https://developer.apple.com/documentation/appkit/nsgraphicscontext/1529827-graphicscontextwithbitmapimagere?language=objc to create Graphics Context for drawing on top of image. This particular API returns null in some cases. One particular case is troubling us.

Problem in the creation of Graphics context(NSGraphicsContext)

2020-03-03 Thread Sravan Kumar Lakkimsetti via Cocoa-dev
Hi, In our product we use https://developer.apple.com/documentation/appkit/nsgraphicscontext/1529827-graphicscontextwithbitmapimagere?language=objc to create Graphics Context for drawing on top of image. This particular API returns null in some cases. One particular case is troubling us. Would

Problem in the creation of Graphics context(NSGraphicsContext)

2020-03-03 Thread Sravan Kumar L via Cocoa-dev
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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:

Problem in the creation of Graphics context(NSGraphicsContext)

2020-02-07 Thread Sravan Kumar L via Cocoa-dev
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please 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: