<!--
{
  "availability" : [
    "FxPlug: 4.0.0 -",
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "professional_video_applications",
  "identifier" : "/documentation/professional_video_applications/FxOnScreenControl_v4/drawOSC(withWidth:height:activePart:destinationImage:at:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Professional Video Applications"
    ],
    "preciseIdentifier" : "c:objc(pl)FxOnScreenControl_v4(im)drawOSCWithWidth:height:activePart:destinationImage:atTime:"
  },
  "title" : "drawOSC(withWidth:height:activePart:destinationImage:at:)"
}
-->

# drawOSC(withWidth:height:activePart:destinationImage:at:)

Draws a control on an image. This is the main method the host application calls to draw a plug-in parameter control.

```
func drawOSC(withWidth width: Int, height: Int, activePart: Int, destinationImage: FxImageTile!, at time: CMTime)
```

## Parameters

`width`

Width of the current image where the control will be drawn.

`height`

Height of the current image where the control will be drawn.

`activePart`

The active part of the control to draw.

`destinationImage`

An [`ioSurface`](/documentation/professional_video_applications/FxImageTile/ioSurface) into which you should draw your OSCs.

`time`

The time at which to draw the control.

## Discussion

This method is called when the host application wants you to draw your onscreen controls. You should draw them into the destination image. The `activePart` parameter tells which part of the control is currently selected so you can draw that control with proper highlighting.

---

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)