Skip to content

Support clipping content #429

Closed
Closed

Description

@birktj

As far as I can see from the code and the documentation there is currently no support for clipping content. At a minium the ability to clip content to be inside a block or box would be very useful in many cases.

I propose adding a clip field to block and box that when set to true will clip the content to be inside these.

Activity

  1. laurmaedje commented on Mar 29, 2023

    @laurmaedje
    Member

    Yeah, the clip field is also how I would implement this. Adding the field is the easy part though, clipping would also need to be integrated with text and SVG rendering.

  2. added
    feature request
    visualize
    on Mar 31, 2023
  3. tmbb commented on Jun 25, 2023

    @tmbb

    This isn't available in the release version yet, is it?

  4. laurmaedje commented on Jun 26, 2023

    @laurmaedje
    Member

    This isn't available in the release version yet, is it?

    It is already available. Note that the currently clipping is always rectangular though, it does not take into account the corner radius.

    Docs: https://typst.app/docs/reference/layout/block/#parameters-clip

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestvisualize

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions