figureone
    Preparing search index...

    Interface OBJ_LineArrow

    Arrow end for a line or polyline.

    Arrows on the end of lines have many of the same properties as stand alone arrows OBJ_Arrow.

    The align property descripes where the line stops relative to the arrow. 'start' will be most useful for pointed arrows. When there is no tail, or a zero length tail, 'mid' can be useful with 'polygon', 'circle' and 'bar' as then the shapes will be centered on the end of the line. Note that in this case the shape will extend past the line.

    • head TypeArrowHead — head style ('triangle')
    • scale number — scale the default dimensions of the arrow
    • length number — dimension of the arrow head along the line
    • width number — dimension of the arrow head along the line width
    • rotation number — rotation of the polygon when head = 'polygon'
    • sides number — number of sides in polygon or circle arrow head
    • radius number — radius of polygon or circle arrow head
    • barb number — barb length (along the length of the line) of the barb arrow head
    • tail booleantrue includes a tail in the arrow of with tailWidth. A number gives the tail a length where 0 will not extend the tail beyond the boundaries of the head
    • align start | mid — define which part of the arrow is aligned at (0, 0) in draw space ('start')
    // Line with triangle arrows on both ends
    figure.add({
    name: 'a',
    make: 'polyline',
    points: [[0, 0], [1, 0]],
    width: 0.02,
    arrow: 'triangle',
    });
    // Line with customized barb arrow at end only
    figure.add({
    name: 'a',
    make: 'shapes.line',
    p1: [0, 0],
    p2: [0, 1],
    width: 0.02,
    arrow: {
    end: {
    head: 'barb',
    width: 0.15,
    length: 0.25,
    barb: 0.05,
    scale: 2
    },
    },
    dash: [0.02, 0.02],
    });
    // Three lines showing the difference between mid align and start align for
    // circle heads
    figure.add([
    {
    name: 'reference',
    make: 'polyline',
    points: [[0, 0.3], [0.5, 0.3]],
    },
    {
    name: 'start',
    make: 'polyline',
    points: [[0, 0], [0.5, 0]],
    arrow: {
    head: 'circle',
    radius: 0.1,
    },
    },
    {
    name: 'mid',
    make: 'polyline',
    points: [[0, -0.3], [0.5, -0.3]],
    arrow: {
    head: 'circle',
    radius: 0.1,
    align: 'mid', // circle mid point is at line end
    },
    },
    ]);