---
title: "Shape - CE.SDK Glossary"
description: "The geometric boundary of a graphic block. Shape and fill are independent, which is what makes CE.SDK's crop and transform operations non-destructive."
url: "https://img.ly/glossary/shape/"
type: "page"
---

> This is the markdown version of [Shape - CE.SDK Glossary](https://img.ly/glossary/shape/). For all pages in one file, see [llms-full.txt](https://img.ly/llms-full.txt). For an index of all available pages, see [llms.txt](https://img.ly/llms.txt).

---

# Shape

A shape is the geometric boundary of a graphic block. It defines the outline of the block and the region that clips its fill. A graphic block without a shape is invisible, even if it has a fill: the engine has nothing to render the fill into.

Shape and fill are independent objects on the same block. The shape says "this region;" the fill says "this content." Either can change without affecting the other. Replace a rectangle with an ellipse and the image inside reflows to the new boundary. Replace the image with a different one and the rectangle stays put.

## Shape types

CE.SDK ships six shape types, each with its own configurable properties.

- **Rectangle** is the default and the most common. Supports corner radius for rounded rectangles. Used for image blocks, sticker frames, background panels.
- **Ellipse** is a circular or oval boundary. Used for round profile images, circular badges, oval crops.
- **Polygon** is a regular polygon with a configurable number of sides.
- **Star** is a star with configurable point count and inner diameter.
- **Line** is a straight line with configurable width and end cap style.
- **Vector path** is a custom shape defined by a vector path. This is the escape hatch for any geometry the built-in types do not cover: irregular outlines, custom illustrations, traced product silhouettes.

## Non-destructive crop, baked in

The shape-and-fill separation is what makes CE.SDK's crop behavior non-destructive. Cropping an image in the editor does not modify the image file. It modifies the shape that clips the fill: the underlying image data stays intact, and the visible portion changes because the shape's boundary changed.

This has real consequences for the product.

- A user can crop, change their mind, uncrop, and never lose any fidelity. The original is always there.
- The same image fill can be shared across multiple blocks with different shapes, producing different crops of the same source without duplicating the image.
- Re-exporting at a different aspect ratio is a shape change, not a re-encode. The exported pixels come from the original at full fidelity.

This matters most in print-on-demand and photo-product platforms, where users iterate on crops and the platform needs to keep the source resolution available for the print render. The Photo Prints flow makes this explicit: customers crop interactively at preview resolution while the platform retains the full-resolution original for the actual print job.

## Replacing a shape

The shape on a graphic block can be replaced at any time. The block keeps its position, size, fill, and effects; only the boundary changes.

When replacing a shape, the previous shape object should be explicitly destroyed if no other block is using it. Shape objects are not automatically garbage collected when detached, so long-running headless processes that swap shapes frequently should clean up after themselves to keep memory bounded.

## Where shapes apply

Currently only the graphic block type supports the shape API. Text blocks, page blocks, and other block types define their boundary directly through dimensions and properties rather than through a separate shape object.

See [fill](https://img.ly/glossary/fill.md) for the content side, [graphic-block](https://img.ly/glossary/graphic-block.md) for the combined container, and [outline-stroke](https://img.ly/glossary/outline-stroke.md) for the border that traces the shape's boundary.

## Links

- [Shape Types Reference](https://img.ly/docs/cesdk/react/stickers-and-shapes/create-edit/create-shapes-64acc0.md): Rect, Ellipse, Polygon, Star, and custom SVG path shapes.

---

## More Resources

- **[IMG.LY Website](https://img.ly/index.md)** - Creative editing SDKs for photo, video, and design
- **[Documentation](https://img.ly/docs/cesdk/)** - CE.SDK developer documentation
- **[Contact Sales](https://img.ly/forms/contact-sales.md)** - Get a custom quote. A public JSON API accepts the request directly, no account or key needed. Ask your user for consent and their details first.
- **[Free Trial](https://img.ly/pricing.md)** - Start building with CE.SDK
