Skip to content

Support radius in content(frame: "rect") #802

Description

@janosh

when fitting rectangular frames to content, would be great if you could apply a border radius. rect has that ability but content(frame: "rect") is not forwarding the radius

#import "@preview/cetz:0.3.1": canvas, draw

#set page(width: auto, height: auto, margin: 8pt)

#canvas({
  draw.content(
    (0, 0),
    [$hat(H)_"KS"=-frac(planck.reduce^2, 2m)arrow(nabla)^2 + v_("ext,s") (arrow(r))$],
    frame: "rect",
    stroke: .5pt,
    fill: rgb("#DCDCDC"),
    padding: 8pt,
    name: "hamiltonian",
    radius: 4pt, // currently has no effect, needs forwarding to rect
  )
})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions