drawing in an FXPlug Filter
drawing in an FXPlug Filter
- Subject: drawing in an FXPlug Filter
- From: Rainer Standke <email@hidden>
- Date: Mon, 28 Mar 2011 08:54:26 -0700
Hello,
I am trying to write filter that leaves the image unchanged, but puts a bit of text in the image. I am already doing the something similar in a generator, where I am following closely what happens in the Scrolling Text sample code. There, the FXImage passed in gets turned into an NSGraphicscontext, and I do my drawing on that.
In a filter I get passed an input image and an output image. I am wondering how I can get the data in the input image into the output image. There are 2 scenarios I can think of:
- get a dataPtr from the input image, and set the dataPtr on the output image to the same, then turn the output image into a NSGraphicsContext, and draw. This seems the easiest, and most expedient.
- create NSGraphicsContext for both input & output, create a NSImageRep fro the input, draw that in the output image. Seems convoluted?
Or is there yet another way? I am very much a newbie to drawing and image manipulation, so any advice would be ver much appreciated.
Thanks,
Rainer _______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden