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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -