Penpot plugins API
    Preparing search index...

    Interface ContextUtils

    Utility methods for various operations in Penpot.

    interface ContextUtils {
        geometry: ContextGeometryUtils;
        types: ContextTypesUtils;
    }
    Index

    Properties

    Properties

    Geometry utility methods for Penpot. Provides methods for geometric calculations, such as finding the center of a group of shapes.

    const centerPoint = penpot.utils.geometry.center(shapes);
    console.log(centerPoint);

    Type utility methods for Penpot. Provides methods for determining the types of various shapes in Penpot.

    const isBoard = utils.types.isBoard(shape);
    console.log(isBoard);