The `# mcrf:` stamp recorded verified=<version>@<commit>, so every commit rewrote
the hash in all 130 snippet headers -- a guaranteed 130-file diff carrying no signal
git history doesn't already have, and one `--check` ignores anyway. The version alone
is stable within a dev cycle ("0.2.8-dev") and becomes the release marker at a tag
("0.2.9"), which is the whole point of the field: freezing a version into the docs
site's history, not pinning a commit.
verified is now version-only. The stamper is idempotent again: a second run on a
clean tree changes zero files. This commit is the one-time normalization that strips
the @hash suffix from the existing headers.
Found while cleaning up after a make release-docs run left all 130 snippets dirty
with nothing but hash churn.
45 lines
1.3 KiB
Python
45 lines
1.3 KiB
Python
# mcrf: objects=[Caption,Color,Frame,Scene,Vector] verified=0.2.8-dev status=ok
|
|
# Frame Origin - Rotation pivot point
|
|
import mcrfpy
|
|
|
|
scene = mcrfpy.Scene("demo")
|
|
mcrfpy.current_scene = scene
|
|
|
|
# Dark background
|
|
scene.children.append(mcrfpy.Frame(pos=(0, 0), size=(1024, 768), fill_color=mcrfpy.Color(30, 30, 40)))
|
|
|
|
# All frames rotated 45 degrees, different origins
|
|
origins = [
|
|
((0, 0), "top-left"),
|
|
((60, 60), "center"),
|
|
((120, 0), "top-right"),
|
|
((0, 120), "bottom-left"),
|
|
]
|
|
|
|
for i, (origin, name) in enumerate(origins):
|
|
x = 150 + (i % 2) * 400
|
|
y = 180 + (i // 2) * 280
|
|
|
|
# Reference frame (no rotation)
|
|
ref = mcrfpy.Frame(
|
|
pos=(x, y), size=(120, 120),
|
|
fill_color=mcrfpy.Color(50, 50, 50),
|
|
outline=1.0,
|
|
outline_color=mcrfpy.Color(100, 100, 100)
|
|
)
|
|
scene.children.append(ref)
|
|
|
|
# Rotated frame
|
|
frame = mcrfpy.Frame(
|
|
pos=(x, y), size=(120, 120),
|
|
fill_color=mcrfpy.Color(200, 100, 150),
|
|
opacity=0.8
|
|
)
|
|
frame.rotation = 45
|
|
frame.origin = mcrfpy.Vector(origin[0], origin[1])
|
|
scene.children.append(frame)
|
|
|
|
label = mcrfpy.Caption(text=f"origin: {name}", pos=(x, y + 160))
|
|
label.outline = 2
|
|
label.outline_color = mcrfpy.Color(0, 0, 0)
|
|
scene.children.append(label)
|