Rect object (Object/browser)

A rectangle object used for layer clip rectangles.

Availability:

JavaScript - 1.2
Netscape - 4.0
JavaScript syntax:NmyRect = myLayer.clip
NmyRect = myStyle.clip
Object properties:bottom, height, left, right, top, width

This object represents a clipping rectangle that the visible part of a display object is viewed through. This is most likely used with a layer object. The layer contents would be drawn off-screen and then that part which falls within the clipping rectangle would be displayed in the window.

This can be useful for performing wipes and making parts of a layer progressively visible within some kind of transition loop.

In the MSIE browser, these rectangular objects are manufactured as needed with the rect() constructor function.

These rectangles are not the same as you can create with the getBoundingClientRect() method, which applies to a TextRange object. That method creates TextRectangle which responds differently to the pixel rectangle we have here.

See also:Clip object, Layer.clip, style.clip, TextRange.getBoundingClientRect(), textRectangle object

PropertyJavaScriptJScriptNIEOperaNESECMADOMCSSHTMLNotes
bottom1.2 1.2 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a n/a-
height1.2 1.2 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a n/a-
left1.2 1.2 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a n/a-
right1.2 1.2 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a n/a-
top1.2 1.2 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a n/a-
width1.2 1.2 n/a4.0 4.0 n/a n/a n/a n/a n/a n/a n/a-

insert figure 0124