- Home
- Learn
- Samples
- Intro
- API
- Register
- Download
- Forum
- Contact
- Buy
- Activate

GoJS Class Index

## Diagram Classes

- Adornment
- AnimationManager
- CommandHandler
- Diagram
- DiagramEvent
- GraphObject
- Group
- InputEvent
- Layer
- Link
- Node
- Overview
- Palette
- Panel
- Part
- Picture
- Placeholder
- RowColumnDefinition
- Shape
- TextBlock

## Geometry Classes

- Brush
- Geometry
- Margin
- PathFigure
- PathSegment
- Point
- Rect
- Size
- Spot

## Model Classes

- Binding
- ChangedEvent
- GraphLinksModel
- Model
- Transaction
- TreeModel
- UndoManager

## Layout Classes

- CircularLayout
- ForceDirectedLayout
- GridLayout
- LayeredDigraphLayout
- Layout
- LayoutNetwork
- TreeLayout

## Tool Classes

- ActionTool
- ClickCreatingTool
- ClickSelectingTool
- ContextMenuTool
- DraggingTool
- DragSelectingTool
- LinkingBaseTool
- LinkingTool
- LinkReshapingTool
- PanningTool
- RelinkingTool
- ResizingTool
- RotatingTool
- TextEditingTool
- Tool
- ToolManager

## Collection Classes

- Iterable
- Iterator
- List
- Map
- Set

GoJS® Diagramming Components
version 1.5.20 for JavaScript/HTML
by Northwoods Software®

# Class PathFigure

A PathFigure represents a section of a Geometry. It is a single connected series of two-dimensional geometric PathSegments.

The Geometry.figures property is a list of PathFigures.

A PathFigure must not be modified once its containing Geometry has been assigned to a Shape.

## Constructor Summary Details

Returns | Name | Description
--- | --- | ---

PathFigure(sx, sy, filled, shadowed)

Constructs an empty figure. More... The optional arguments specify the starting point of the figure. You'll want to add a new instance of a PathFigure to the Geometry.figures list of a Geometry.

Parameters:
{number=} sx
  optional: the X coordinate of the start point (default is zero).
{number=} sy
  optional: the Y coordinate of the start point (default is zero).
{boolean=} filled
  optional: whether the figure is filled (default is true).
{boolean=} shadowed
  optional: whether the figure may be drawn with a shadow (default is true).

## Properties Summary Details

Returns | Name | Description
--- | --- | ---
{boolean} | isFilled | Gets or sets whether this PathFigure is drawn filled. More... The default value is true.
{boolean} | isShadowed | Gets or sets whether this PathFigure will render a shadow if one is defined. More... This is used for turning off shadows on specific subpaths. The default value is true.
{List.<PathSegment>} | segments | Gets or sets the List of PathSegments that define this PathFigure.
{number} | startX | Gets or sets the starting point X coordinate of the PathFigure. More... The default value is zero.
{number} | startY | Gets or sets the starting point Y coordinate of the PathFigure. More... The default value is zero.

## Method Summary Details

Returns | Name | Description
--- | --- | ---

{PathFigure}

add(segment) 1.5

Add a PathSegment to the segments list. More...

Parameters:
{PathSegment} segment
  a newly allocated unshared PathSegment that will become owned by this PathFigure

Returns:
{PathFigure}

{PathFigure}

copy()

Create a copy of this PathFigure, with the same values and segments.

Returns:
{PathFigure}