Re: NSShadow with [bezierPath addClip]

2014-01-02 Thread Leonardo
Many thanks David. That did the trick.

Regards
-- Leonardo


> Da: David Duncan 
> Data: Wed, 01 Jan 2014 17:44:01 -0800
> A: Leonardo 
> Cc: Cocoa-dev 
> Oggetto: Re: NSShadow with [bezierPath addClip]
> 
> In CoreGraphics the way you would do this is to setup your shadow parameters,
> then start a transparency layer, do your drawing there, then composite that
> back to the original context. Something like this:
> 
> CGContextSetShadow(context, shadowOffset, shadowBlur);
> CGContextBeginTransparencyLayer(context, NULL);
> // do your drawing
> CGContextEndTransparencyLayer(context);
> 
> You could get the graphicsPort from the NSGraphicsContext to call the
> transperancy layer methods and otherwise stick to NSGraphics stuff.
> 
> On Dec 31, 2013, at 4:15 AM, Leonardo  wrote:
> 
>> In my NSView subclass, I have to draw an image within a bezierPath and apply
>> an NSShadow to the result.
>> So within the drawRect: method I add
>> 
>> [bezierPath addClip];
>> [mImage drawInRect:inRect fromRect:fromRect
>> operation:NSCompositeSourceOver fraction:mOpacity];
>> 
>> It works. The image gets clipped by the path.
>> Now I would like to apply the NSShadow to the result, so before those lines
>> above I add
>> 
>> [bezierPath addClip];
>> [mShadow set];
>> [mImage drawInRect:inRect fromRect:fromRect operation:NSCompositeSourceOver
>> fraction:mOpacity];
>> 
>> I can't get the shadow drawn because the bezierPath is clipping the drawing
>> area where the shadow should fall.
>> How to solve this trouble?
>> I have tried to use a layer, but I get weird results when I resize, rotate
>> and modify other parameters of the view.
>> 
>> 
>> Regards
>> -- Leonardo
>> 
>> 
>> ___
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com
>> 
>> This email sent to david.dun...@apple.com
> 
> --
> David Duncan
> 


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Memory Leak on UIImage resizableImageWithCapInsets

2014-01-02 Thread Sasikumar JP
Hi,

I am using the following code to create Custom VolumeSlider. Is there
anything wrong with this implementation.

Instruments identifies the memory leak "resizableImageWithCapInsets" call.

MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:self.
volumeSliderView.bounds];

[volumeView setMaximumVolumeSliderImage:[[UIImage imageNamed:
@"SliderMaximum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 10)]
forState:UIControlStateNormal];

[volumeView setMinimumVolumeSliderImage:[[UIImage imageNamed:
@"SliderMinimum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 10, 0, 0)]
forState:UIControlStateNormal];

[volumeView setRouteButtonImage:[UIImage imageNamed:@"Airplay"] forState
:UIControlStateNormal];

[volumeView setVolumeThumbImage:[UIImage imageNamed:@"VolumeThumb"]
forState:UIControlStateNormal];

[self.volumeSliderView addSubview:volumeView];

volumeView = nil;

Any help is highly appreciated.


Thank you

Sasikumar JP
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Memory Leak on UIImage resizableImageWithCapInsets

2014-01-02 Thread Appa Rao Mulpuri
Add [volumeView release] before making it to nil.


Regards,

Apparao Mulpuri
Senior Systems Analyst, Mac Poker
IVY Comptech Private Limited
6th Floor, Block B, Divyasree Omega,
Kondapur, Hyderabad-500081.
Mobile + 91 (0) 988 500 4790
DD + 91 (0) 40 4472 1000 ext: 4391



On 1/3/14 10:16 AM, "Sasikumar JP"  wrote:

>Hi,
>
>I am using the following code to create Custom VolumeSlider. Is there
>anything wrong with this implementation.
>
>Instruments identifies the memory leak "resizableImageWithCapInsets" call.
>
>MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:self.
>volumeSliderView.bounds];
>
>[volumeView setMaximumVolumeSliderImage:[[UIImage imageNamed:
>@"SliderMaximum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0,
>10)]
>forState:UIControlStateNormal];
>
>[volumeView setMinimumVolumeSliderImage:[[UIImage imageNamed:
>@"SliderMinimum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 10, 0,
>0)]
>forState:UIControlStateNormal];
>
>[volumeView setRouteButtonImage:[UIImage imageNamed:@"Airplay"]
>forState
>:UIControlStateNormal];
>
>[volumeView setVolumeThumbImage:[UIImage imageNamed:@"VolumeThumb"]
>forState:UIControlStateNormal];
>
>[self.volumeSliderView addSubview:volumeView];
>
>volumeView = nil;
>
>Any help is highly appreciated.
>
>
>Thank you
>
>Sasikumar JP
>___
>
>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:
>https://lists.apple.com/mailman/options/cocoa-dev/apparaom%40ivycomptech.c
>om
>
>This email sent to appar...@ivycomptech.com

This email and any attachments are confidential, and may be legally privileged 
and protected by copyright. If you are not the intended recipient dissemination 
or copying of this email is prohibited. If you have received this in error, 
please notify the sender by replying by email and then delete the email 
completely from your system. Any views or opinions are solely those of the 
sender. This communication is not intended to form a binding contract unless 
expressly indicated to the contrary and properly authorised. Any actions taken 
on the basis of this email are at the recipient's own risk.

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Memory Leak on UIImage resizableImageWithCapInsets

2014-01-02 Thread Sasikumar JP
Apprao,
   I forgot to mention that this code uses ARC. so release not required.

Thank you
Sasikumar JP

Sent from my iPhone

> On Jan 3, 2014, at 10:39 AM, Appa Rao Mulpuri  
> wrote:
> 
> Add [volumeView release] before making it to nil.
> 
> 
> Regards,
> 
> Apparao Mulpuri
> Senior Systems Analyst, Mac Poker
> IVY Comptech Private Limited
> 6th Floor, Block B, Divyasree Omega,
> Kondapur, Hyderabad-500081.
> Mobile + 91 (0) 988 500 4790
> DD + 91 (0) 40 4472 1000 ext: 4391
> 
> 
> 
>> On 1/3/14 10:16 AM, "Sasikumar JP"  wrote:
>> 
>>   Hi,
>> 
>>   I am using the following code to create Custom VolumeSlider. Is there
>> anything wrong with this implementation.
>> 
>> Instruments identifies the memory leak "resizableImageWithCapInsets" call.
>> 
>> MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:self.
>> volumeSliderView.bounds];
>> 
>>   [volumeView setMaximumVolumeSliderImage:[[UIImage imageNamed:
>> @"SliderMaximum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0,
>> 10)]
>> forState:UIControlStateNormal];
>> 
>>   [volumeView setMinimumVolumeSliderImage:[[UIImage imageNamed:
>> @"SliderMinimum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 10, 0,
>> 0)]
>> forState:UIControlStateNormal];
>> 
>>   [volumeView setRouteButtonImage:[UIImage imageNamed:@"Airplay"]
>> forState
>> :UIControlStateNormal];
>> 
>>   [volumeView setVolumeThumbImage:[UIImage imageNamed:@"VolumeThumb"]
>> forState:UIControlStateNormal];
>> 
>>   [self.volumeSliderView addSubview:volumeView];
>> 
>>   volumeView = nil;
>> 
>> Any help is highly appreciated.
>> 
>> 
>> Thank you
>> 
>> Sasikumar JP
>> ___
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/apparaom%40ivycomptech.c
>> om
>> 
>> This email sent to appar...@ivycomptech.com
> 
> This email and any attachments are confidential, and may be legally 
> privileged and protected by copyright. If you are not the intended recipient 
> dissemination or copying of this email is prohibited. If you have received 
> this in error, please notify the sender by replying by email and then delete 
> the email completely from your system. Any views or opinions are solely those 
> of the sender. This communication is not intended to form a binding contract 
> unless expressly indicated to the contrary and properly authorised. Any 
> actions taken on the basis of this email are at the recipient's own risk.

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Memory Leak on UIImage resizableImageWithCapInsets

2014-01-02 Thread Appa Rao Mulpuri
will helps you probably  ‹
http://stackoverflow.com/questions/14264598/instrument-and-leaks

Regards,
Apparao Mulpuri


On 1/3/14 10:41 AM, "Sasikumar JP"  wrote:

>Apprao,
>   I forgot to mention that this code uses ARC. so release not required.
>
>Thank you
>Sasikumar JP
>
>Sent from my iPhone
>
>> On Jan 3, 2014, at 10:39 AM, Appa Rao Mulpuri
>> wrote:
>>
>> Add [volumeView release] before making it to nil.
>>
>>
>> Regards,
>>
>> Apparao Mulpuri
>> Senior Systems Analyst, Mac Poker
>> IVY Comptech Private Limited
>> 6th Floor, Block B, Divyasree Omega,
>> Kondapur, Hyderabad-500081.
>> Mobile + 91 (0) 988 500 4790
>> DD + 91 (0) 40 4472 1000 ext: 4391
>>
>>
>>
>>> On 1/3/14 10:16 AM, "Sasikumar JP"  wrote:
>>>
>>>   Hi,
>>>
>>>   I am using the following code to create Custom VolumeSlider. Is there
>>> anything wrong with this implementation.
>>>
>>> Instruments identifies the memory leak "resizableImageWithCapInsets"
>>>call.
>>>
>>> MPVolumeView *volumeView = [[MPVolumeView alloc] initWithFrame:self.
>>> volumeSliderView.bounds];
>>>
>>>   [volumeView setMaximumVolumeSliderImage:[[UIImage imageNamed:
>>> @"SliderMaximum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0,
>>> 10)]
>>> forState:UIControlStateNormal];
>>>
>>>   [volumeView setMinimumVolumeSliderImage:[[UIImage imageNamed:
>>> @"SliderMinimum"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 10,
>>>0,
>>> 0)]
>>> forState:UIControlStateNormal];
>>>
>>>   [volumeView setRouteButtonImage:[UIImage imageNamed:@"Airplay"]
>>> forState
>>> :UIControlStateNormal];
>>>
>>>   [volumeView setVolumeThumbImage:[UIImage imageNamed:@"VolumeThumb"]
>>> forState:UIControlStateNormal];
>>>
>>>   [self.volumeSliderView addSubview:volumeView];
>>>
>>>   volumeView = nil;
>>>
>>> Any help is highly appreciated.
>>>
>>>
>>> Thank you
>>>
>>> Sasikumar JP
>>> ___
>>>
>>> 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:
>>>
>>>https://lists.apple.com/mailman/options/cocoa-dev/apparaom%40ivycomptech
>>>.c
>>> om
>>>
>>> This email sent to appar...@ivycomptech.com
>>
>> This email and any attachments are confidential, and may be legally
>>privileged and protected by copyright. If you are not the intended
>>recipient dissemination or copying of this email is prohibited. If you
>>have received this in error, please notify the sender by replying by
>>email and then delete the email completely from your system. Any views
>>or opinions are solely those of the sender. This communication is not
>>intended to form a binding contract unless expressly indicated to the
>>contrary and properly authorised. Any actions taken on the basis of this
>>email are at the recipient's own risk.

This email and any attachments are confidential, and may be legally privileged 
and protected by copyright. If you are not the intended recipient dissemination 
or copying of this email is prohibited. If you have received this in error, 
please notify the sender by replying by email and then delete the email 
completely from your system. Any views or opinions are solely those of the 
sender. This communication is not intended to form a binding contract unless 
expressly indicated to the contrary and properly authorised. Any actions taken 
on the basis of this email are at the recipient's own risk.

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

libcrypto linking problem in Leopard

2014-01-02 Thread Appa Rao Mulpuri
Hi List,

I am using Mac OS X 10.8 SDK for the development and deployment target set to 
Mac OS 10.5. I am using libcrypto dylib in my code base, application is working 
fine in all the OS, except in Leopard. Application is failing to launch in 
Leopard and giving the Library not loaded error.

Library not found: /usr/lib/libcrypto.0.9.8.dylib
Reason: no suitable image found.

I tried to build the application on mavericks with libcrypto.0.9.7.dylib by 
updating the libcrypto.dylib alias in 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib,
 but no luck. Its giving me compile time errors saying symbols not found.

 I primarily wants to move to Mavericks for my regular development and take 
advantage of LLVM compiler for its greater speed (compared with GCC).

http://stackoverflow.com/questions/2616738/linking-to-libcrypto-for-leopard 
gone though this url. Solution is available if you are using the 10.6 SDK for 
development. To make it work with 10.6 SDK + Xcode 5, copied 10.6 and 10.7 sdks 
into 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/,
 but unfortunately Xcode 5 is not displaying them in the Build settings window.

Is there any way to get rid of the libCrypto linking issue?

Regards,

Apparao Mulpuri
Senior Systems Analyst, Mac Poker
IVY Comptech Private Limited
6th Floor, Block B, Divyasree Omega,
Kondapur, Hyderabad-500081.
Mobile + 91 (0) 988 500 4790
DD + 91 (0) 40 4472 1000 ext: 4391
[Description: 
cid:D3A34606-CDE4-42D4-8A76-036EAFC49156@ivycomptech.partygaming.local]

This email and any attachments are confidential, and may be legally privileged 
and protected by copyright. If you are not the intended recipient dissemination 
or copying of this email is prohibited. If you have received this in error, 
please notify the sender by replying by email and then delete the email 
completely from your system. Any views or opinions are solely those of the 
sender. This communication is not intended to form a binding contract unless 
expressly indicated to the contrary and properly authorised. Any actions taken 
on the basis of this email are at the recipient's own risk.
<>___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: libcrypto linking problem in Leopard

2014-01-02 Thread Kyle Sluder
On Thu, Jan 2, 2014, at 11:15 PM, Appa Rao Mulpuri wrote:
> Hi List,
> 
> I am using Mac OS X 10.8 SDK for the development and deployment target
> set to Mac OS 10.5. I am using libcrypto dylib in my code base,

Do not link directly against libcrypto (nor libssl). Its API is not
stable between point releases, and new versions of OS X need to adopt
new versions of libcrypto to incorporate security fixes.

The stable library for performing cryptography is Security.framework.

--Kyle Sluder
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com