Re: Making a "shaped" NSImage
Re: Making a "shaped" NSImage
- Subject: Re: Making a "shaped" NSImage
- From: "Dave Mattson" <email@hidden>
- Date: Mon, 18 Nov 2002 11:25:16 -0600
Hello:
It's always going to be a rectangle. But you control things by the
NSComposite choice when drawing the image. ClipPath can help to make sure
there is no unintended filling the whole rectangle but that image is still
going to be a rectangle.
The different NSComposite's can cause a lot of different effects, you are
probably looking for "Source Over". Then, at least a black curve on a white
background (don't draw the background into the image-unless you want the
inside of the curve filled), will just draw the curve at image draw time.
Dave Mattson
email@hidden
ph: 608 635 7972
fax: 608 635 8971
cell: 608 444 5245
Dekorra Optics, LLC
W9386 Parkway Drive
Poynette, WI 53955
----- Original Message -----
From: "Jeremy Faller" <email@hidden>
To: <email@hidden>
Sent: Monday, November 18, 2002 9:30 AM
Subject: Making a "shaped" NSImage
>
>
All:
>
>
Hello everyone. I have a question that I'm sure is pretty easy,
although I haven't quite been able to smurf it.
>
>
Let's pretend that I have an NSBezierPath that describes some region,
and I would like to draw an NSImage ONLY in the path. I'm not concerned
right now with alpha, or any other component of the image. Additionally, to
make it easy, let's assume the path is blackColor. Does anyone know how to
do this?
>
>
>
Thanks in advance.
>
>
- Jeremy Faller.
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.