• 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
Re: Fixed pattern with colorWithPatternImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fixed pattern with colorWithPatternImage


  • Subject: Re: Fixed pattern with colorWithPatternImage
  • From: Daniel Lopes <email@hidden>
  • Date: Sat, 4 Sep 2010 17:16:59 -0300

Hello Quincey,

Thanks, I thought that a simple thing like that could be done easier. My background is from web dev (specially Ruby).

That app is just a simple pet project and for that I will use a simple gradient instead of the image. I tried the image because I want a small noise instead of a plain gradient.

But really thanks for all the help, I will study the link that you sent and also study Coregraphics.

Sent from my iPad

On 04/09/2010, at 14:52, Quincey Morris <email@hidden> wrote:

> On Sep 4, 2010, at 10:13, Daniel - Area wrote:
>
>> My code is basically this:
>> http://pastie.org/1138167
>>
>> a) Looking my code I think the issue is exactly what you said. But
>> what is the right object and properties to access the full size of the
>> view?
>
> No, what I said is not the problem. You're not using the 'rect' parameter at all.
>
> Consulting the 'colorWithPatternImage:' documentation:
>
>> Parameters
>> image
>> The image to use as the pattern for the color object. The image is tiled starting at the bottom of the window. The image is not scaled.
>
> The pattern is tiled relative to the window, not to the view. So, the 'colorWithPatternImage:' isn't a viable approach in this case.
>
> You're going to have to browse the documentation to find a different approach (or search for sample code you can adapt). One possibility might be NSGradient, another might be NSDrawThreePartImage. These are both discussed here:
>
> 	http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Introduction/Introduction.html
>
> Or, you might be able to drop down to core graphics, and use something like CGContextDrawTiledImage.
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Fixed pattern with colorWithPatternImage
      • From: Ken Ferry <email@hidden>
    • Re: Fixed pattern with colorWithPatternImage
      • From: James Montgomerie <email@hidden>
References: 
 >Fixed pattern with colorWithPatternImage (From: Pessoal <email@hidden>)
 >Re: Fixed pattern with colorWithPatternImage (From: Quincey Morris <email@hidden>)
 >Re: Fixed pattern with colorWithPatternImage (From: Daniel - Area <email@hidden>)
 >Re: Fixed pattern with colorWithPatternImage (From: Quincey Morris <email@hidden>)

  • Prev by Date: Register/Function Parm Mapping for 64-bit Was: isTemporaryID unrecognized selector…
  • Next by Date: Re: Register/Function Parm Mapping for 64-bit Was: isTemporaryID unrecognized selector…
  • Previous by thread: Re: Fixed pattern with colorWithPatternImage
  • Next by thread: Re: Fixed pattern with colorWithPatternImage
  • Index(es):
    • Date
    • Thread