Contents

init(rect:inContext:)

Creates a JavaScript representation of the specified rectangle.

Declaration

init!(rect: CGRect, inContext context: JSContext!)

Parameters

  • rect:

    A CoreGraphics rectangle structure.

  • context:

    The JavaScript context in which to create the value.

Return Value

A JavaScript object representing the specified rectangle.

Discussion

Converting a rectangle creates a JavaScript object value with fields named x, y, width, and height.

See Also

Creating JavaScript Values