Class Index | File Index

Classes


Class TKRect

The TKRect provides some utilities to deal with a rectangle data type, allowing to obtain coordinates of the rectangle's points of interest as TKPoint objects and its edges as TKSegment objects, or obtaining a rectangle resulting in the union of several others.


Defined in: Utils.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
TKRect(x, y, width, height)
Field Summary
Field Attributes Field Name and Description
 
The height.
 
The width.
 
x
The x coordinate.
 
y
The y coordinate.
Method Summary
Method Attributes Method Name and Description
<static>  
TKRect.rectFromClientRect(rect)
Returns a TKRect from a rectangle returned by the Node.getBoundingClientRect method.
Class Detail
TKRect(x, y, width, height)
Parameters:
{float} x
The x coordinate.
{float} y
The y coordinate.
{float} width
The width.
{float} height
The height.
Since:
TuneKit 1.0
Field Detail
{float} height
The height.

{float} width
The width.

{float} x
The x coordinate.

{float} y
The y coordinate.
Method Detail
<static> {TKRect} TKRect.rectFromClientRect(rect)
Returns a TKRect from a rectangle returned by the Node.getBoundingClientRect method.
Parameters:
{ClientRect} rect
The CSS client rectangle.
Returns:
{TKRect} The equivalent rectangle as a TuneKit data type.

Copyright © 2009 Apple Inc. All rights reserved.