Willem Rein Oudshoorn wrote:
> Enrico Sersale <enrico@www.imago.ro> writes:
>
> > To do this I need to use NSImage's [compositeToPoint: fromRect: operation:
> > fraction:], that, in the actual implementation says:
> > "// FIXME We need another PS command for this" `
> >
> > I would know if there are particular problems in writing this or, simply,
> > this has not be written.
[...]
> Well, as the FIXME suggest, invent a DPScommand for it.
> But for this you should probably ask Adam.
[...]
Next/Openstep have the operator
APPKIT_EXTERN void DPScomposite(DPSContext ctxt, float x, float y, float w, float h, int gstateNum, float dx, float dy, int op);
However this is probably not what you want. This command seems a bit tedious to implement on account of the various operators (op) which determine how transperancy is handled when combining two images.
What you need to display dimmed icons is:
APPKIT_EXTERN void DPSdissolve(DPSContext ctxt, float x, float y, float w, float h, int gstateNum, float dx, float dy, float delta);
delta indicates the portion that is taken from the image and combined with (1 - delta) from the destination rect.