# Layer Transform & Bounds Planner > Calculate a layer transform, rotated corners and canvas bounds. Enter canvas and layer dimensions, center position, rotation and flips. Get the affine matrix for normalized layer coordinates plus exact corner and bounding-box coordinates. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://luminalayertransform.usefulweb.site/ (interactive tool at https://luminalayertransform.usefulweb.site/tool) - JSON API: POST https://luminalayertransform.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://luminalayertransform.usefulweb.site/api/v1/tool) - OpenAPI: https://luminalayertransform.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://luminalayertransform.usefulweb.site/mcp - tool `lumina_layer_transform` ## Inputs - canvasWidth (integer): Canvas width (px) - canvasHeight (integer): Canvas height (px) - width (integer): Layer width (px) - height (integer): Layer height (px) - x (number): Layer center X (px) - y (number): Layer center Y (px) - rotation (number): Rotation (degrees) - flipX (boolean): Flip horizontally - flipY (boolean): Flip vertically ## Method - For layer-local coordinates u/v from 0 to 1, canvas x = a*u + c*v + e and y = b*u + d*v + f. - The layer rotates around its center. Flips apply in local space before rotation. Coordinates outside the canvas are retained. - The same affine transform is used by Design Layers for selection, dragging and mask coordinates.