an hour ago
API_DrawingType::anchorPoint is documented as "Placement reference by bounding box node (relevant only if not useOwnOrigoAsAnchor)" — nothing suggests it's output-only. However, I cannot find a way to actually set it through the API.
Repro (minimal):
ACAPI_Element_Create, explicitly setting element.drawing.anchorPoint = APIAnc_RT (or any value other than APIAnc_LB) before the call.ACAPI_Element_Get.Observed: anchorPoint always comes back as APIAnc_LB, and pos always equals bounds.xMin/yMin (the bottom-left corner), regardless of what was requested at creation.
Also tried: calling ACAPI_Element_Change on an already-placed Drawing with the anchorPoint mask bit set, to any of the 9 values. Same result every time.
Ruled out as a factor: whether the Drawing has a custom clip frame (isCutWithFrame = true, clip polygon in absolute layout coordinates) or not (isCutWithFrame = false, auto-fit extent) — identical behavior in both cases, tested explicitly.
Interesting data point: a Drawing placed interactively through the UI (Drawing Settings dialog, 3×3 anchor grid) correctly stores and reports a non-APIAnc_LB anchor (e.g. Center) when read with ACAPI_Element_Get — so the field is genuinely meaningful and persisted when set by the UI. It's specifically ACAPI_Element_Create/ACAPI_Element_Change that force it back to APIAnc_LB. Worse: calling ACAPI_Element_Change on such a UI-placed Drawing — even for an unrelated field — also resets its UI-set anchor to APIAnc_LB, and it cannot be restored to its original value through the API either.
Side finding, in case it's related: bounds is cached and does not reflect a pos change until ACAPI_Drawing_Update_Drawings is called — and even then, only across a separate command/API round-trip; calling Update+Get+Change within the same function call (same synchronous execution) doesn't see the updated bounds.
Questions:
anchorPoint actually settable via the API at all for a view-linked Drawing, or is it silently read-only despite the doc wording?pos (and poly/clip coordinates, which are stored in absolute coordinates and need a matching shift)?anchorPoint to APIAnc_LB via an unrelated ACAPI_Element_Change call (e.g. changing only ratio) expected/by design, and is there any way to avoid that side effect?
Operating system used: Mac Apple Silicon