Dynamic Icons Scripting Reference - v1.3.0
    Preparing search index...

    Function linearGaugeTicksPath

    • Returns a Path2D object containing tick marks arranged along a straight line, like on a linear thermometer. Each segment of the resulting path consists of a separate line for each "tick."

      Parameters

      • x: number

        Horizontal starting coordinate

      • y: number

        Vertical starting coordinate

      • size: number

        Total length of path for ticks. The ticks will be spaced to fit within this size.

      • vertical: boolean

        The line will be drawn vertically if true, horizontally otherwise.

      • count: number

        Number of tick marks to draw; These will be spaced out evenly between the relevant starting coordinate and the given size.

      • len: number | number[]

        Length of tick marks. Negative value draws a tick mark of that length from the line towards top/left. Positive values draw towards bottom/right. Length can also be an array of lengths, in which case it will use the line lengths from array for each consecutive line, modulo the array's length. eg. drawing any even number of ticks with alternating sizes: l = [10, 5] A line length of zero in the array can be used to skip drawing a tick at that position.

      • ctr: boolean = false

        Set to true to center the tick marks along the line, dividing the given length(s) by 2 so that half the tick points to the top/left and half to the bottom/right.

      Returns Path2D