SVG Arc Large Sweep Flag Pair Check

Validate explicit SVG arc flag integers 0 or 1 and expose their boolean meanings; does not construct an ellipse.

Description

Validate explicit SVG arc flag integers 0 or 1 and expose their boolean meanings; does not construct an ellipse.

SVG arc flags have two binary fields whose meanings must not be confused with a complete arc construction.

When to use this tool

Validate explicit SVG arc flag integers 0 or 1 and expose their boolean meanings; does not construct an ellipse.

  • Prepare the supplied largeArc, sweep fields for this operation.
  • Compare the complete example with the representation used by your own input before carrying the result into another step.

How to use the tool and how it works

  1. Enter largeArc, sweep. Use the exact text syntax, units and index conventions explained below.
  2. Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
  3. Read result.largeArc, result.sweep, result.flags. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.

Require largeArc and sweep each zero or one. Return their boolean forms and the two space-separated digits as flags.1

Input fieldMeaning and representationAccepted input
largeArclarge arc.Integer from 0 to 1 inclusive
sweepsweep.Integer from 0 to 1 inclusive
Output fieldInterpretation
resultObject containing the named outputs below.
result.largeArcFlag for large arc under the exact condition described above.
result.sweepFlag for sweep under the exact condition described above.
result.flagsThe flags value under the stated formula or text convention.
json
{
  "input": {
    "largeArc": 1,
    "sweep": 0
  },
  "output": {
    "result": {
      "largeArc": true,
      "sweep": false,
      "flags": "1 0"
    }
  }
}

Limitations and assumptions

  • No radii, endpoints, arc geometry or coordinate orientation is evaluated.
  • Point pairs use [x,y], rectangles and viewBox use [x,y,width,height], and all coordinate units must be consistent. This tool does not read, render or modify an SVG document.
  • Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
  • Lists are limited to 128 entries. JSON text must meet bounded size and depth checks, and numeric outputs beyond the safe finite magnitude are rejected. Exact large integers use decimal strings.
  • Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.

Alternative or Complementary methods

Use a full SVG parser or rendering engine when the task includes commands and CSS values outside the documented branch. Compare coordinates and transforms under the same units and viewport convention.

References

  1. Tool behavior and example: SVG Arc Large Sweep Flag Pair Check — tool.io

Similar or alternative tools

  • Absolute Line Command Differencer

    Difference explicit absolute SVG M/L commands against the preceding current point, initially the origin; no curves or closepath.

  • Line Cap Extension Budget

    Compute ideal axial line-cap extension budget for straight segments; round caps are not rectangular area bounds and joins are outside scope.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies