Class Index | File Index

Classes


Class Polyline


Extends HomeObject.

Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Polyline(points, thickness, capStyle, joinStyle, dashStyle, startArrowStyle, endArrowStyle, closedPath, color)
Creates a polyline from the given coordinates.
Method Summary
Method Attributes Method Name and Description
 
addPoint(x, y, index)
Adds a point at the given index.
 
Adds the property change listener in parameter to this wall.
 
Returns a clone of this polyline.
 
containsPoint(x, y, margin)
Returns true if this polyline contains the point at (x, y) with a given margin.
 
Returns the cap style of this polyline.
 
Returns the color of this polyline.
 
Returns the dash style of this polyline.
 
Returns the arrow style at the end of this polyline.
 
Returns the join style of this polyline.
 
Returns an approximate length of this polyline.
 
Returns the level which this dimension line belongs to.
 
Returns the number of points of the polygon matching this polyline.
 
getPointIndexAt(x, y, margin)
Returns the index of the point of this polyline equal to the point at (x, y) with a given margin.
 
Returns the points of the polygon matching this polyline.
 
Returns the arrow style at the start of this polyline.
 
Returns the thickness of this polyline.
 
intersectsRectangle(x0, y0, x1, y1)
Returns true if this polyline intersects with the horizontal rectangle which opposite corners are at points (x0, y0) and (x1, y1).
 
isAtLevel(level)
Returns true if this dimension line is at the given level or at a level with the same elevation and a smaller elevation index.
 
Returns true if the first and last points of this polyline should be joined to form a polygon.
 
move(dx, dy)
Moves this polyline of (dx, dy) units.
 
removePoint(index)
Removes the point at the given index.
 
Removes the property change listener in parameter from this wall.
 
setCapStyle(capStyle)
Sets the cap style of this polyline.
 
setClosedPath(closedPath)
Sets whether the first and last points of this polyline should be joined.
 
setColor(color)
Sets the color of this polyline.
 
setDashStyle(dashStyle)
Sets the dash style of this polyline.
 
setEndArrowStyle(endArrowStyle)
Sets the arrow style at the end of this polyline.
 
setJoinStyle(joinStyle)
Sets the join style of this polyline.
 
setLevel(level)
Sets the level of this dimension line.
 
setPoint(x, y, index)
Sets the point at the given index.
 
setPoints(points)
Sets the points of the polygon matching this polyline.
 
setStartArrowStyle(startArrowStyle)
Sets the arrow style at the start of this polyline.
 
setThickness(thickness)
Sets the thickness of this polyline.
Methods borrowed from class HomeObject:
getProperty, getPropertyNames, setProperty
Class Detail
Polyline(points, thickness, capStyle, joinStyle, dashStyle, startArrowStyle, endArrowStyle, closedPath, color)
Creates a polyline from the given coordinates.
Author: Emmanuel Puybaret.
Parameters:
{Array} points
{number} thickness
{Polyline.CapStyle} capStyle
{Polyline.JoinStyle} joinStyle
{Polyline.DashStyle} dashStyle
{Polyline.ArrowStyle} startArrowStyle
{Polyline.ArrowStyle} endArrowStyle
{boolean} closedPath
{number} color
Method Detail
addPoint(x, y, index)
Adds a point at the given index.
Parameters:
{number} x
{number} y
{number} index
Throws:
IndexOutOfBoundsException if index is negative or > getPointCount()

addPropertyChangeListener(listener)
Adds the property change listener in parameter to this wall.
Parameters:
{PropertyChangeListener} listener

{Polyline} clone()
Returns a clone of this polyline.
Returns:
{Polyline}

{boolean} containsPoint(x, y, margin)
Returns true if this polyline contains the point at (x, y) with a given margin.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{boolean}

{Polyline.CapStyle} getCapStyle()
Returns the cap style of this polyline.
Returns:
{Polyline.CapStyle}

{number} getColor()
Returns the color of this polyline.
Returns:
{number}

{Polyline.DashStyle} getDashStyle()
Returns the dash style of this polyline.
Returns:
{Polyline.DashStyle}

{Polyline.ArrowStyle} getEndArrowStyle()
Returns the arrow style at the end of this polyline.
Returns:
{Polyline.ArrowStyle}

{Polyline.JoinStyle} getJoinStyle()
Returns the join style of this polyline.
Returns:
{Polyline.JoinStyle}

{number} getLength()
Returns an approximate length of this polyline.
Returns:
{number}

{Level} getLevel()
Returns the level which this dimension line belongs to.
Returns:
{Level}

{number} getPointCount()
Returns the number of points of the polygon matching this polyline.
Returns:
{number}

{number} getPointIndexAt(x, y, margin)
Returns the index of the point of this polyline equal to the point at (x, y) with a given margin.
Parameters:
{number} x
{number} y
{number} margin
Returns:
{number} the index of the first found point or -1.

{Array} getPoints()
Returns the points of the polygon matching this polyline.
Returns:
{Array} an array of the (x,y) coordinates of the polyline points.

{Polyline.ArrowStyle} getStartArrowStyle()
Returns the arrow style at the start of this polyline.
Returns:
{Polyline.ArrowStyle}

{number} getThickness()
Returns the thickness of this polyline.
Returns:
{number}

{boolean} intersectsRectangle(x0, y0, x1, y1)
Returns true if this polyline intersects with the horizontal rectangle which opposite corners are at points (x0, y0) and (x1, y1).
Parameters:
{number} x0
{number} y0
{number} x1
{number} y1
Returns:
{boolean}

{boolean} isAtLevel(level)
Returns true if this dimension line is at the given level or at a level with the same elevation and a smaller elevation index.
Parameters:
{Level} level
Returns:
{boolean}

{boolean} isClosedPath()
Returns true if the first and last points of this polyline should be joined to form a polygon.
Returns:
{boolean}

move(dx, dy)
Moves this polyline of (dx, dy) units.
Parameters:
{number} dx
{number} dy

removePoint(index)
Removes the point at the given index.
Parameters:
{number} index
Throws:
IndexOutOfBoundsException if index is negative or >= getPointCount()

removePropertyChangeListener(listener)
Removes the property change listener in parameter from this wall.
Parameters:
{PropertyChangeListener} listener

setCapStyle(capStyle)
Sets the cap style of this polyline. Once this polyline is updated, listeners added to this polyline will receive a change notification.
Parameters:
{Polyline.CapStyle} capStyle

setClosedPath(closedPath)
Sets whether the first and last points of this polyline should be joined. Once this polyline is updated, listeners added to this polyline will receive a change notification.
Parameters:
{boolean} closedPath

setColor(color)
Sets the color of this polyline. Once this polyline is updated, listeners added to this polyline will receive a change notification.
Parameters:
{number} color

setDashStyle(dashStyle)
Sets the dash style of this polyline. Once this polyline is updated, listeners added to this polyline will receive a change notification.
Parameters:
{Polyline.DashStyle} dashStyle

setEndArrowStyle(endArrowStyle)
Sets the arrow style at the end of this polyline. Once this polyline is updated, listeners added to this polyline will receive a change notification.
Parameters:
{Polyline.ArrowStyle} endArrowStyle

setJoinStyle(joinStyle)
Sets the join style of this polyline. Once this polyline is updated, listeners added to this polyline will receive a change notification.
Parameters:
{Polyline.JoinStyle} joinStyle

setLevel(level)
Sets the level of this dimension line. Once this dimension line is updated, listeners added to this dimension line will receive a change notification.
Parameters:
{Level} level

setPoint(x, y, index)
Sets the point at the given index.
Parameters:
{number} x
{number} y
{number} index
Throws:
IndexOutOfBoundsException if index is negative or >= getPointCount()

setPoints(points)
Sets the points of the polygon matching this polyline. Once this polyline is updated, listeners added to this polyline will receive a change notification.
Parameters:
{Array} points

setStartArrowStyle(startArrowStyle)
Sets the arrow style at the start of this polyline. Once this polyline is updated, listeners added to this polyline will receive a change notification.
Parameters:
{Polyline.ArrowStyle} startArrowStyle

setThickness(thickness)
Sets the thickness of this polyline. Once this polyline is updated, listeners added to this polyline will receive a change notification.
Parameters:
{number} thickness

© Copyrights 2017 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 25 2017 16:36:09 GMT+0200 (CEST)