--- layout: page title: Icon shapes subtitle: Pick a preset or draw your own shape, then send it to Murine permalink: /icon-shapes/ sitemap: false # keep it out of sitemap.xml noindex: true # and out of search engines ---

Editor

All corners
CutRoundSquircle
Grid
Polygon / star

Result

Link format

An edit link opens an icon in this editor. It's the editor's URL with the icon in its fragment, in one of two forms:

Opening either one loads the icon (the previous one stays a step back in Undo); Share then gives the short link and the link that sends the shape to Murine. A link that doesn't follow the format below is ignored, and the editor keeps the icon it had.

Checking a link

A link written by hand or by a script is worth opening before it's shared: the canvas shows the shape, and anything the launcher can't use (shapes that don't touch, crossing edges) is reported in red under Result, which also disables Use in Murine. Other messages are just information: a corner whose size shrinks its neighbours, for instance, is fine if the shape looks as intended. Small fixes can be made right there. Share then has the finished links: the address of its Edit link entry is the compressed edit link (clicking the entry copies it), and Use in Murine points to the import link.

The JSON

{"shapes": [
  {"pts": [{"x": 50, "y": 4, "r": 12, "s": 0.6}, {"x": 97.6, "y": 38.5, "r": 12, "s": 0.6}, …],
   "mirror": "none"}
]}

A shape can also be an SVG outline instead of corners, for free-form curves. It can be mixed with corner shapes in the same icon, and takes mirror too:

{"path": "M 50 0 C 77.6 0 100 22.4 100 50 C 100 77.6 77.6 100 50 100 C 22.4 100 0 77.6 0 50 C 0 22.4 22.4 0 50 0 Z"}

Next to shapes, an optional whole transforms the icon as a whole, after its shapes are merged (mirrored copies included), without changing them: {"shapes": [...], "whole": {"a": 0.9, "x": 5, "y": 5, "ang": 30, "flip": true}}. In order: flip (optional, default false) turns the icon over left to right within the 100 × 100 box; a (default 1) scales it and x, y (default 0) move it; ang (default 0) turns it clockwise, in degrees, around the middle of where the box now is. In the editor it's the Global card.

Example

A rounded pentagon: {"shapes":[{"pts":[{"x":50,"y":4,"r":12,"s":0.6},{"x":97.6,"y":38.5,"r":12,"s":0.6},{"x":79.4,"y":94.5,"r":12,"s":0.6},{"x":20.6,"y":94.5,"r":12,"s":0.6},{"x":2.4,"y":38.5,"r":12,"s":0.6}]}]}