Line
- class Communicator.Markup.Shape.Line()
This class represents a single line consisting of two points. P1 is considered the start and P2 is considered the end of the line. Each Point may have its endcap settings adjusted independently.
Constructors
Creates a new Line Shape |
Methods
Constructors
Methods
getEndEndcapColor
- Communicator.Markup.Shape.Line.getEndEndcapColor()
Gets the color of the end endcap. Default value is black.
- Return type
Communicator.Color
- Returns
color for the end endcap.
getEndEndcapSize
- Communicator.Markup.Shape.Line.getEndEndcapSize()
Gets the size of the end endcap in pixels. Default value is 9.
- Return type
Communicator.Pixels
- Returns
size of the end endcap.
getEndEndcapType
- Communicator.Markup.Shape.Line.getEndEndcapType()
Gets the end endcap type for this shape. The default value is none.
- Return type
Communicator.Markup.Shape.EndcapType
- Returns
the end endcap type
getEndcapsInverted
- Communicator.Markup.Shape.Line.getEndcapsInverted()
Gets whether endcaps are inverted for this shape. The default value is false.
- Return type
boolean
- Returns
value indicating whether endcaps are inverted
getP1
- Communicator.Markup.Shape.Line.getP1()
Gets the first point of the line segment
- Return type
Communicator.Point2
- Returns
the first point of the line segment
getP2
- Communicator.Markup.Shape.Line.getP2()
Gets the second point of the line segment
- Return type
Communicator.Point2
- Returns
the second point of the line segment
getStartEndcapColor
- Communicator.Markup.Shape.Line.getStartEndcapColor()
Gets the color of the start endcap. Default value is black.
- Return type
Communicator.Color
- Returns
color for the start endcap.
getStartEndcapSize
- Communicator.Markup.Shape.Line.getStartEndcapSize()
Gets the size of the start endcap in pixels. Default value is 9.
- Return type
Communicator.Pixels
- Returns
size of the start endcap.
getStartEndcapType
- Communicator.Markup.Shape.Line.getStartEndcapType()
Gets the start endcap type for this shape. The default Value is none.
- Return type
Communicator.Markup.Shape.EndcapType
- Returns
the start endcap type
getStrokeColor
- Communicator.Markup.Shape.Line.getStrokeColor()
Gets the stroke color for this shape
- Return type
Communicator.Color
- Returns
the stroke color
getStrokeWidth
- Communicator.Markup.Shape.Line.getStrokeWidth()
Gets the stroke width for this shape in pixels
- Return type
Communicator.Pixels
- Returns
the stroke width in pixels
set
- Communicator.Markup.Shape.Line.set(p1, p2)
Sets the points that define the line segment
- Arguments
p1 (
Communicator.Point2()
) – first point of the line segmentp2 (
Communicator.Point2()
) – second point of the line segment
- Return type
void
setEndEndcapColor
- Communicator.Markup.Shape.Line.setEndEndcapColor(color)
Sets the color for the end endcap.
- Arguments
color (
Communicator.Color()
) – the end endcap color value.
- Return type
void
setEndEndcapSize
- Communicator.Markup.Shape.Line.setEndEndcapSize(size)
Sets the size of the end endcap in pixels.
- Arguments
size (
Communicator.Pixels()
) – the end endcap.
- Return type
void
setEndEndcapType
- Communicator.Markup.Shape.Line.setEndEndcapType(endcapType)
Sets the end endcap type for this shape
- Arguments
endcapType (
Communicator.Markup.Shape.EndcapType()
) – the new endcap type
- Return type
void
setEndcapType
- Communicator.Markup.Shape.Line.setEndcapType(endcapType)
Convenience for setting the start and eend endcap type for this shape
- Arguments
endcapType (
Communicator.Markup.Shape.EndcapType()
) – the new endcap type
- Return type
void
setEndcapsInverted
- Communicator.Markup.Shape.Line.setEndcapsInverted(inverted)
Sets whether endcapsare inverted for this shape.
- Arguments
inverted (
boolean()
) – value indicated whether endcaps should be inverted
- Return type
void
setP1
- Communicator.Markup.Shape.Line.setP1(p1)
Sets the first point of the line segment
- Arguments
p1 (
Communicator.Point2()
) – first point of the line segment
- Return type
void
setP2
- Communicator.Markup.Shape.Line.setP2(p2)
sets the first point of the line segment
- Arguments
p2 (
Communicator.Point2()
) – second point of the line segment
- Return type
void
setStartEndcapColor
- Communicator.Markup.Shape.Line.setStartEndcapColor(color)
Sets the color for the start endcap.
- Arguments
color (
Communicator.Color()
) – the start endcap color value.
- Return type
void
setStartEndcapSize
- Communicator.Markup.Shape.Line.setStartEndcapSize(size)
Sets the size of the start endcap in pixels.
- Arguments
size (
Communicator.Pixels()
) – the start endcap.
- Return type
void
setStartEndcapType
- Communicator.Markup.Shape.Line.setStartEndcapType(endcapType)
Sets the start endcap type for this shape
- Arguments
endcapType (
Communicator.Markup.Shape.EndcapType()
) – the new endcap type
- Return type
void