SVG Marker Reference Point Placement
Place a marker reference point at an anchor after uniform scale and rotation; coordinates are in the same caller-defined plane.
Description
Place a marker reference point at an anchor after uniform scale and rotation; coordinates are in the same caller-defined plane.
A marker reference point can be rotated and scaled before translating it onto an anchor. Translation must compensate for that transformed reference.
When to use this tool
Place a marker reference point at an anchor after uniform scale and rotation; coordinates are in the same caller-defined plane.
- Prepare the supplied refX, refY, anchorX, anchorY, scale, angleDegrees 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
- Enter refX, refY, anchorX, anchorY, scale, angleDegrees. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.translateX, result.translateY. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Require positive scale, compute sine/cosine of angleDegrees, transform the refX/refY vector and return anchor minus that scaled vector as translateX/Y.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| refX | ref x. | Finite number |
| refY | ref y. | Finite number |
| anchorX | anchor x. | Finite number |
| anchorY | anchor y. | Finite number |
| scale | scale. | Finite number; greater than zero |
| angleDegrees | angle degrees. | Finite number |
| Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.translateX | The translate x value under the stated formula or text convention. |
| result.translateY | The translate y value under the stated formula or text convention. |
{
"input": {
"refX": 2,
"refY": 3,
"anchorX": 10,
"anchorY": 20,
"scale": 2,
"angleDegrees": 0
},
"output": {
"result": {
"translateX": 6,
"translateY": 14
}
}
} Limitations and assumptions
- This is one geometric placement model, without markerUnits, a full SVG transform stack or automatic tangent orientation.
- 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
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.
- 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.