cappuccino - Clip a CPImage into a circle or other shape -


i have rectangular cpimage setup so

    var img = [[cpimage alloc] initwithcontentsoffile:"resources/img.jpg""]; 

i'd display in cpview subclass in circle part of image clipped (what lies outside eclipse) remaining transparent. tried this:

- (void)drawrect:(cgrect)arect {         var path = [cpbezierpath bezierpathwithovalinrect:arect];      [[cpcolor colorwithpatternimage:img] set];     [path fill]; } 

but black circle.

the problem here can't use image fill (yet) in cappuccino. it'll turn out black discovered, commands you're using technically correct. i'm not aware of work around try posting cappuccino user list , see if working on feature right now.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -