Rect:
Filter:
Classes | Geometry

Rect : Object

Rectangle
Source: Rect.sc
Subclasses: RoundedRect

Class Methods

Rect.new(left: 0, top: 0, width: 0, height: 0)

Return a new Rect with the given upper left corner and dimensions.

Rect.newSides(left: 0, top: 0, right: 0, bottom: 0)

Return a new Rect with the given boundaries.

Rect.fromPoints(pt1, pt2)

Return a new Rect defined by the given Points.

Inherited class methods

Undocumented class methods

Rect.aboutPoint(point, dx, dy)

Rect.fromArray(array)

Rect.fromRect(rect)

Rect.multiNew( ... args)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Extensions/extSCView-multiNew.sc

Rect.rand(x: 1.0, y: 1.0, w: 1.0, h: 1.0)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extRect-transformations.sc

Rect.rand2(x: 1.0, y: 1.0, w: 1.0, h: 1.0)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extRect-transformations.sc

Instance Methods

.left

.left = value

Get or set the value of the boundary.

.top

.top = value

Get or set the value of the boundary.

.right

.right = r

Get the value of the boundary.

.bottom

.bottom = b

Get the value of the boundary.

.set(argLeft: 0, argTop: 0, argWidth: 0, argHeight: 0)

Set the boundaries to the given values.

.setExtent(argWidth: 0, argHeight: 0)

Set the dimensions.

.width

.width = value

Set or get the width.

.height

.height = value

Set or get the height.

.origin

.origin = pt

Return the upper left corner as a Point.

.extent

.extent = pt

Return a Point whose x value is the height and whose y value is the width.

.leftTop

Return the upper left corner as a Point.

.rightTop

Return the upper right corner as a Point.

.leftBottom

Return the lower left corner as a Point.

.rightBottom

Return the lower right corner as a Point.

.moveBy(h, v)

Returns a new Rect which is offset by x and y.

.moveTo(h, v)

Returns a new Rect whose upper left corner is moved to (x, y).

.moveToPoint(aPoint)

Returns a new Rect whose upper left corner is moved to aPoint.

.resizeBy(h, v)

Returns a new Rect whose dimensions have been changed by (x, y).

.resizeTo(h, v)

Returns a new Rect whose dimensions are (x, y).

.insetBy(h, v)

Returns a new Rect whose boundaries have been inset by (x, y). If only one argument is supplied, it will be used for both x and y.

.insetAll(a, b, c, d)

Returns a new Rect whose boundaries have been inset by the given amounts.

.contains(anObject)

Answers whether aPoint is in the receiver.

.union(aRect)

|(aRect)

Returns a new Rect which contains the receiver and aRect.

.sect(aRect)

&(aRect)

Returns a new Rect which is the intersection of the receiver and aRect.

Inherited instance methods

Undocumented instance methods

+(that)

-(that)

==(that)

.anchorTo(pt, position)

.asArray

.asPageLayout

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/crucial-library/deprecated-3.5.sc

.asRect

.asSize

.blend(that, blendfrac: 0.5)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/Main Features/SVGFile/extPoint-blend.sc

.bounds

.center

.center = center

.centerIn(inRect)

.centerSquare

.containsPoint(aPoint)

.containsRect(aRect)

.corners

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extRect-rotate.sc

.draw(color, operation: 2)

.flipY

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/adclib/Classes/GUI/extWinBounds.sc

.hash

.insetByRect(r)

.intersects(aRect)

.layout(argBounds)

.max(aRect)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extRect-transformations.sc

.min(aRect)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extRect-transformations.sc

.performBinaryOpOnSomething(aSelector, thing, adverb)

.rotate(amt, x, y)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extRect-rotate.sc

.rotatedCorners(amt: 0, x, y)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extRect-rotate.sc

.scale(scalePoint)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extRect-transformations.sc

.scaleCenteredIn(toRect, keepRatio: false, ratio: 1, move: 0.5)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extPen-transformToRect.sc

.scaleTranslate(scalePoint, deltaPoint)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extRect-transformations.sc

.size

.size = sz

.transformFromRect(rect, fromRect, keepRatio: false, ratio: 1, move: 0.5)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extPen-transformToRect.sc

.transformToRect(rect, fromRect, keepRatio: false, ratio: 1, move: 0.5)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extPen-transformToRect.sc

.translate(deltaPoint)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extRect-transformations.sc

.translateScale(deltaPoint, scalePoint)

From extension in /home/stefan/.local/share/SuperCollider/downloaded-quarks/wslib/wslib-classes/GUI/Drawing/extRect-transformations.sc