# Compare dash starting phases in VectorPaint: shifting the pattern on one path

Language: en
Canonical: [Compare dash starting phases in VectorPaint: shifting the pattern on one path](<https://allluckly.cn/en/guides/vectorpaint-dashoffset-phase-open-line/>)
中文：[中文 HTML](<https://allluckly.cn/guides/vectorpaint-dashoffset-phase-open-line/>)
English: [English HTML](<https://allluckly.cn/en/guides/vectorpaint-dashoffset-phase-open-line/>)
Published: 2026-11-22T00:00:00+08:00
Modified: 2026-11-22T09:03:03+08:00
Author: Bison

Make three SVG lines with the same coordinates, compare dash offsets, and check what survives import and export.

English translation of the [Chinese original](<https://allluckly.cn/guides/vectorpaint-dashoffset-phase-open-line/>), translated on 2026-11-22. Original publication dates, attribution, code and version notes are retained.

Make three SVG lines with the same coordinates, compare dash offsets, and check what survives import and export.

## Frame the experiment

This exercise observes a dash pattern moving along a fixed SVG path, not the path itself. Prepare three identical horizontal lines, each from x=20 to x=200, with the same color, stroke width and cap, and a dash array of 12 and 6. Change only the offset: 0, 6 and 18. The SVG reference describes how offset affects the pattern start; it does not guarantee that any app version preserves the attribute on import.

## Calculate the expected period

The array 12 6 alternates a painted length of 12 units with a gap of 6; a full cycle is 18 units. Offsets 18 and 0 differ by exactly one cycle, so their repeated phase should match; offset 6 should differ. Use numeric units rather than assuming a percentage means a percentage of path length, and do not assume coordinate units are device pixels. Write down these predictions before observing the result.

## Create an independent source file

In an available plain-text editor create an SVG with root xmlns http://www.w3.org/2000/svg and viewBox 0 0 220 140. Add three line elements, each with x1=20 and x2=200; set y1 and y2 to 30, 70 and 110 for the respective lines. Give each stroke=#31554c, stroke-width=4, stroke-linecap=butt and stroke-dasharray=12 6. Set stroke-dashoffset to 0, 6 and 18 respectively. Save as dash-phase.svg and make a backup; confirm the extension is not svg.txt.

Copy the complete sample:

```
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 220 140">
  <line x1="20" y1="30" x2="200" y2="30" stroke="#31554c" stroke-width="4" stroke-linecap="butt" stroke-dasharray="12 6" stroke-dashoffset="0"/>
  <line x1="20" y1="70" x2="200" y2="70" stroke="#31554c" stroke-width="4" stroke-linecap="butt" stroke-dasharray="12 6" stroke-dashoffset="6"/>
  <line x1="20" y1="110" x2="200" y2="110" stroke="#31554c" stroke-width="4" stroke-linecap="butt" stroke-dasharray="12 6" stroke-dashoffset="18"/>
</svg>
```

## Check the first segments against coordinates

Treat x=20 at the left path endpoint as local distance zero. At offset 0, the first two painted segments run from x=20 to x=32 and x=38 to x=50, with a gap from x=32 to x=38. With positive offset 6 the pattern is read from six units into the cycle: the first visible painted portion runs from x=20 to x=26, followed by a gap to x=32 and paint to x=44. Offset 18 matches offset 0 over a full cycle. Butt caps put the visible end face at the calculated centerline boundary; do not judge from one antialiased edge pixel or a cropped image.

Mark 20, 26, 32, 38, 44 and 50 on paper, then enlarge the browser view to compare segment order. Zoom helps inspection without changing source coordinates. A mistakenly negative offset changes the phase direction; restore positive 6 and keep any negative-value variation as a separate experiment, so the verification table answers one question at a time.

## Check a browser baseline

Open the original in an SVG-capable browser. The lines should occupy different heights with aligned path endpoints. The top and bottom dashes and gaps should align, while the middle row should have a different phase. Record the first visible dash position in each row and recheck attributes in the file. If all rows look identical, check the offset spelling and any overriding style; if lines are missing, check XML quotes, namespace and color. Keep the browser result for comparison; it is not a device acceptance test.

## Import a copy and inspect objects

In the installed VectorPaint, look for a currently available SVG open or import entry and choose the working copy. If no entry exists or the file is unsupported, record the step as incomplete rather than treating an attribute name as a guaranteed button. Before editing, inspect the rows, endpoints and rhythm, then try selecting each object. Record whether each is separately selectable and whether it matches the browser baseline; matching appearance alone does not prove the original SVG attributes survived.

## Compare without adding variables

If a single row can be selected, move only that row into empty space and undo to confirm the selection; do not also change color, width or scale. If copying is available, preserve the untouched import and experiment on a duplicate. If the middle row differs from the source, record exactly where; do not immediately blame the offset, since zoom, path conversion or rendering may also contribute. If undo is unavailable, return to the saved copy.

## Check the output in two ways

Use a share or export option actually available in the installed version and save separately without overwriting the SVG source. Reopen the output and compare the rows at the same scale. If the output is SVG, inspect its text for the lines and offset or a conversion into other paths. If only a bitmap is available, assess visible appearance only; do not claim it remains editable vector. Record filename, format, separate selection and differences from the source, keeping browser and app outputs distinct.

## Check the sample boundaries

The rows use different y coordinates only so they can be seen at once; compare length and phase horizontally. If screenshots were taken at different scales, restore the same scale and align the left endpoints before comparing visual distances. Keep the coordinate table beside the file to help inspect another dash array later.

## Troubleshoot and preserve the result

If top and bottom differ, check their coordinates, array, cap and width in the backup; confirm 18 is the whole array period rather than just the painted 12. If the middle row does not change, check for a style overriding the attribute and open the browser source and app output separately. Keep a short record of prediction, browser display, app import, reopened export and pending items; mark unperformed steps as pending. Finally verify the backup still opens before sharing the exercise.

## Compare a negative offset

Save a separate experiment copy and change only the middle line’s offset from positive 6 to negative 6. Using the dash period, path start x=20 falls in a gap and the first visible dash runs from x=26 to x=38; with positive 6 it instead runs from x=20 to x=26. Compare both files in a browser. If the direction differs from the paper prediction, check the minus sign and which copy is open. This extra experiment does not change the app-import result.

## Related guides and sources

[Dash-array repetition](<https://allluckly.cn/en/guides/vectorpaint-svg-dash-pattern-odd-list-repetition/>); [Stroke cap comparison](<https://allluckly.cn/en/guides/vectorpaint-svg-stroke-linecap-endpoint-comparison/>).

Checked 22 November 2026: [Apple public version lookup](<https://itunes.apple.com/lookup?id=1587272880&country=cn&entity=software>); [MDN: stroke-dashoffset](<https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/stroke-dashoffset>). No physical-device or private-server test is claimed.

