Stroke endpoints and SVG handoff

VectorPaint stroke caps: equal centerlines with different butt, round and square extensions

Compare three identical centerlines using an external SVG sample, then check import, endpoints and output in VectorPaint while separating geometric expectations from observed rendering.

English translation of the Chinese original, translated on . Original publication dates, attribution, code and version notes are retained.

Even without moving a path, its stroke may look longer because of its end caps. Prepare three horizontal lines with identical endpoints and use SVG butt, round and square caps, then inspect rendering and editing through an actual supported VectorPaint import route. Calculations are external expectations, not a claim that app import or format fidelity has been tested on a device.

Fix the centerline and stroke width

In an owned exercise record, set a 240 × 160 viewBox and three lines at y = 40, 80 and 120. Each centerline runs from x = 80 to x = 160 with stroke width 20. The centerline is 80 units long; cap value is the only difference. Leave space above for labels and retain the original sample separately from explanatory text. Colors, sizes and positions are reproducible exercise choices, not claimed app defaults. Sketch coordinate axes first and distinguish the x = 80 path endpoint from the outer stroke edge.

Save complete SVG source for all three lines

In an existing plain-text editor, save the following as cap-comparison.svg. Keep the svg extension, root element and namespace; do not copy just the three line elements. Color, width and endpoints are identical and only stroke-linecap differs. Save an original before handing a copy to an actually available SVG import entry. Do not overwrite the original without a backup or assume these attribute names are buttons in the app.

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 160">
  <line x1="80" y1="40" x2="160" y2="40" stroke="#31554c" stroke-width="20" stroke-linecap="butt"/>
  <line x1="80" y1="80" x2="160" y2="80" stroke="#31554c" stroke-width="20" stroke-linecap="round"/>
  <line x1="80" y1="120" x2="160" y2="120" stroke="#31554c" stroke-width="20" stroke-linecap="square"/>
</svg>

Separate path endpoints from stroke bounds

In W3C's cap definitions, butt stops at the endpoint; round adds an outward semicircle; square extends a rectangular half stroke-width beyond the endpoint. At width 20, round and square extend 10 on each end, giving horizontal bounds 70–170 and width 100. Butt spans 80–160 and width 80. Each centerline remains 80 long, and equal outer bounds do not make round and square shapes identical. At width 10 the extension becomes 5 per end, not 10.

Use area to distinguish square from round

Ignoring antialiasing, butt produces an 80 × 20 rectangle, or 1600 square user units. Round adds two semicircles of radius 10, together one circle, giving 1600 + 100π, about 1914.16. Square adds 10 × 20 at each end for 2000. This paper geometry has no joins, transforms or clipping and is not a pixel measurement. Equal horizontal width 100 does not imply equal area: inspect the endpoint corners at a larger scale.

Import a real copy and inspect each line

Open the copy through an SVG import route actually available in the installed version. Check that all three lines appear in order, then compare the butt's straight end, the round arc and the square's corners. When selecting a line, record the objects and editing controls actually presented; if import converts an object, do not assume its original attribute or nodes remain unchanged. Public material describes SVG editing, not fidelity for every SVG attribute on every device. If import is unavailable, record version, entry and message, preserving the external sample and calculation for troubleshooting.

Make a controlled copy changing only the cap

If the present interface offers an identifiable cap setting, change the first line from butt to round in a second copy while preserving endpoints, width, color and the other lines. If it does not, change only that line's attribute in an external text copy and import again. Compare the first two appearances and check centerline coordinates have not been rewritten. Do not also scale the line or change its width. If the two still differ, investigate inherited styling or import conversion and save original and modified copies separately.

Record the original first line beside the modified first line, not only the first and second in one file: those already have different vertical coordinates. A ledger can state “original first line butt; copy first line round; shared endpoints 80 and 160; shared width 20”, leaving the actual import result blank until observed. If the software converts a line to a curve object, a matching appearance does not prove the exported code still uses a line element. Save and inspect the real export separately; mark element type pending if code has not been checked. Keeping both source files makes the change traceable without guessing from screenshots.

Troubleshoot clipping, scale and small images

If the round or square end is incomplete, check canvas and clipping boundaries first; x = 70–170 lies inside this sample's viewBox. If lengths appear different but endpoints cannot be selected, check whether the selection is the outer stroke rather than the path center, then consult source coordinates. Zoom changes screen pixels, so screenshot width is not a direct user-unit measurement. Antialiasing also affects tiny edges; enlarge the view and record source and rendered result as separate evidence.

Export and recheck editability

Save the actual editable project, then export SVG or PNG as needed and reopen it in a separate viewer supporting that format. Compare outlines, clipping and three-line order. If delivering editable SVG, inspect the elements and attributes actually exported; an extension alone does not prove full preservation. PNG is a raster result without editable SVG paths. Record app version, import route, original and exported copies, and checks actually performed. Leave unperformed import, export or reopening pending.

VectorPaint fill and stroke; Make an icon from shapes.

Method reference: W3C SVG 2 stroke caps. The three-line coordinates, areas and controlled comparison are original exercise choices; specification geometry does not establish a particular app's import compatibility.

Checked 20 November 2026: Apple's public lookup lists VectorPaint 1.0.8, requiring iOS / iPadOS 17.0 or later. The official store describes SVG editing. These are repeatable instructions and external calculations; no completed physical-device app test is claimed.