Class: RectGL
Rendering.WebGL.RectGL(x, y, width, height)
Represents rectangle in math coordinate system, used by WebGL
Constructor
new RectGL(x, y, width, height)
Parameters:
Name | Type | Description |
---|---|---|
x | float | Math coordinate system x |
y | float | Math coordinate system y |
width | float | Rect width |
height | float | Rect height |
Properties:
Name | Type | Description |
---|---|---|
left | float | x coordinate |
x | float | left alias |
bottom | float | y coordinate |
y | float | bottom alias |
right | float | x + width |
top | float | y + height |
width | float | rect width |
height | float | rect height |
Methods
ceil(evenopt) → Rendering.WebGL.RectGL
Floor LeftBottom, Ceil RightTop points
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
even | boolean | <optional> | false | Rect width and height will be multiples of 2 |
Returns:
ceiling result
Type
floor() → Rendering.WebGL.RectGL
Ceil LeftBottom, Floor RightTop points
Returns:
flooring result
Type
intersect(rect) → Rendering.WebGL.RectGL
Intersects 2 rects
Parameters:
Name | Type | Description |
---|---|---|
rect | Rendering.WebGL.RectGL | intersect with area |
Returns:
intersection result
Type
transform(matrix) → Common.Rect
Transform rect. Result rect is bounds of transformed edges.
Parameters:
Name | Type | Description |
---|---|---|
matrix | Common.Matrix | Transform matrix |
Returns:
Transformed rect
Type
union(rect) → Rendering.WebGL.RectGL
Union 2 rects
Parameters:
Name | Type | Description |
---|---|---|
rect | Rendering.WebGL.RectGL | union with area |
Returns:
union result
Type
(static) calculateBrushGLSegmentBounds(point, scatteringopt, transform) → Rendering.WebGL.RectGL
Calculates segment bounds
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
point | PathBuilding.PathPoint | |||
scattering | float | <optional> | 0 | |
transform | Common.Matrix |
Returns:
new instance
Type
(static) ofEdges(left, bottom, right, top) → Rendering.WebGL.RectGL
Creates new instance
Parameters:
Name | Type | Description |
---|---|---|
left | float | |
bottom | float | |
right | float | |
top | float |
Returns:
new instance
Type