Portion of Canvas that is visible in ScrollView?

I have a Canvas inside a ScrollView on a Mac. The Canvas's size is determined by a model (for the example below, I am simply drawing a grid of circles of a given radius). Everything appears to works fine.

However, I am wondering if it is possible for the Canvas rendering code to know what portion of the Canvas is actually visible in the ScrollView?

For example, if the Canvas is large but the visible portion is small, I would like to avoid drawing content that is not visible.

Is this possible?

Example of Canvas in a ScrollView I am using for testing:

struct MyCanvas: View {
    @ObservedObject var model: MyModel
        
    var body: some View {
        ScrollView([.horizontal, .vertical]) {
            Canvas { context, size in
                // Placeholder rendering code
                for row in 0..<model.numOfRows {
                    for col in 0..<model.numOfColumns {
                        let left: CGFloat = CGFloat(col * model.radius * 2)
                        let top: CGFloat = CGFloat(row * model.radius * 2)
                        let size: CGFloat = CGFloat(model.radius * 2)
                        let rect = CGRect(x: left, y: top, width: size, height: size)
                        let path = Circle().path(in: rect)
                        context.fill(path, with: .color(.red))
                    }
                }
            }
            .frame(width: CGFloat(model.numOfColumns * model.radius * 2),
                   height: CGFloat(model.numOfRows * model.radius * 2))
        }
    }
}
Portion of Canvas that is visible in ScrollView?
 
 
Q