<!--
{
  "availability" : [
    "macCatalyst: -",
    "macOS: 10.0.0 - 10.6.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSImage/compositeToPoint:operation:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSImage(im)compositeToPoint:operation:"
  },
  "title" : "compositeToPoint:operation:"
}
-->

# compositeToPoint:operation:

Composites the entire image to the specified point in the current coordinate system.

```
- (void) compositeToPoint:(NSPoint) point operation:(NSCompositingOperation) operation;
```

## Parameters

`point`

The point at which to draw the image, specified in the current coordinate system.

`operation`

The compositing operation to use when drawing the image to the screen. The supported compositing operations are described in `Constants`.

## Discussion

This method draws the receiver’s best image representation at the specified point in the currently focused view. The entire image is drawn using its current size information. During drawing, the image is composited from its offscreen window cache. Because the offscreen cache is not created until the image representation is first used, this method may need to render the image before compositing. Bitmap representations in particular are not cached until they are explicitly rendered. You can use the [`lockFocus()`](/documentation/AppKit/NSImage/lockFocus()) and [`unlockFocus()`](/documentation/AppKit/NSImage/unlockFocus()) methods to force the cached version to be created.

During printing, this method ignores the `op` parameter. Even though this parameter is ignored, this method attempts to render the image as close as possible to its appearance when the compositing operation is used on the screen. In either case, the best image representation is chosen for the printing context.

## See Also

[`func draw(at: NSPoint, from: NSRect, operation: NSCompositingOperation, fraction: CGFloat)`](/documentation/AppKit/NSImage/draw(at:from:operation:fraction:))

Draws all or part of the image at the specified point in the current coordinate system.

[`func draw(in: NSRect, from: NSRect, operation: NSCompositingOperation, fraction: CGFloat)`](/documentation/AppKit/NSImage/draw(in:from:operation:fraction:))

Draws all or part of the image in the specified rectangle in the current coordinate system.

[`- (void) dissolveToPoint:(NSPoint) point fraction:(CGFloat) fraction;`](/documentation/AppKit/NSImage/dissolveToPoint:fraction:)

Composites the entire image to the specified location using the source-over operator.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)