I’ve a NSBitmapImageRep and trying to set pixel with something like:
[imageRep setColor:color atX:point y:val]
It draws fine but I want to set the color such that it blends with the neighboring pixels (C# has it by default, and in Java it can be done by setFilterBitmap(true).
setFilterBitmapsets a bitmap to be filtered when it is scaled or rotated. It does not inherently have any effect on the pixels. If you displayed an affected drawable at its native resolution and with no rotation, each pixel would correspond 1:1 with the colours you had set originally.The Cocoa equivalent would be to use a layer-backed view (see especially
setWantsLayer:, I forget what Interface Builder does by default nowadays). That’ll give your view an associatedCALayerobject accessible via thelayerproperty. Those have magnification and minification filters and you’ll notice that the default formagnificationFilteriskCAFilterLinear, which should give the same effect as the Java property you mention.You should directly manipulate the layer’s
transformproperty to adjust how the layer is composited separately from the view.