Crosshair icon

Added in v0.1.0

A free pencil-style crosshair icon, drawn by code from 1 circle and 4 lines. Use it as an SVG, a React component, or by name. MIT licensed.

crosshair

01Use it

Use crosshair

One package, four ways in. The icon inherits currentColor and is decorative unless you give it a title. Install it with npm i @matita/icons.

React

import { Crosshair } from '@matita/icons/react';

<Crosshair size={24} />

// or by name
import { SketchIcon } from '@matita/icons/react';
<SketchIcon name="crosshair" />

JavaScript

import { Crosshair, toSvg } from '@matita/icons';

toSvg(Crosshair, { size: 24 });   // SVG string

SVG

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" overflow="visible" class="sketch-icon sketch-icon-crosshair" data-sketch="" aria-hidden="true"><path d="M9.51 4.87C9.89 4.76 11.03 4.28 11.8 4.24C12.57 4.2 13.4 4.39 14.14 4.65C14.88 4.91 15.61 5.3 16.26 5.78C16.91 6.25 17.58 6.81 18.05 7.49C18.52 8.17 18.86 9.03 19.05 9.85C19.25 10.67 19.29 11.57 19.23 12.42C19.18 13.26 18.99 14.12 18.71 14.91C18.43 15.71 18.08 16.54 17.57 17.18C17.06 17.83 16.36 18.35 15.67 18.79C14.99 19.23 14.22 19.66 13.44 19.82C12.66 19.98 11.82 19.86 11.01 19.75C10.21 19.64 9.34 19.56 8.63 19.17C7.93 18.79 7.34 18.09 6.8 17.46C6.25 16.82 5.72 16.14 5.37 15.38C5.03 14.61 4.84 13.74 4.73 12.89C4.62 12.04 4.57 11.13 4.69 10.27C4.81 9.41 5.02 8.45 5.45 7.73C5.89 7 6.99 6.23 7.3 5.93" stroke-width="1.472"/><path d="M12.06 2.17Q12.1 4.81 12.09 7.46" stroke-width="1.712"/><path d="M11.88 16.89Q11.69 19.42 11.86 21.94" stroke-width="1.584"/><path d="M2.22 12.18Q4.77 12.05 7.32 12.09" stroke-width="1.792"/><path d="M16.65 11.85Q19.26 12.09 21.87 12.09" stroke-width="1.696"/></svg>

Pencil variant

import '@matita/icons/pencil.css';
import { Crosshair } from '@matita/icons/react';

<Crosshair size={32} pencil />

The file is icons/crosshair.svg in the package (pencil/crosshair.svg for the pencil variant). Matita 0.7.0.

02How it's drawn

The recipe for crosshair

Crosshair is not stored as a drawing. It is a recipe of 1 circle and 4 lines on a 24 by 24 grid, and a small program draws it like a pencil would. The wobble comes from the name, so it always comes out the same.

A · Recipe
C 12 12 7.5;
L 12 2.5 12 7;
L 12 17 12 21.5;
L 2.5 12 7 12;
L 17 12 21.5 12
B · Plotted
C · Drawn
How it works

03Takes, sizes, pencil

Same icon, every way

Pass a seed for another take of the same recipe. The wobble is capped, so it still reads at 16 px.

seed 0
seed 1
seed 2
seed 3
seed 4

Five seeds of crosshair. Seed 0 is the default.

wobble 0
wobble 0.25
wobble 0.5
wobble 0.75
wobble 1

crosshair from exact shapes (wobble 0) to the full hand (wobble 1, the default). The exact version is also a ready-made file: exact/crosshair.svg.

16 px
20 px
24 px
32 px
48 px
96 px

True pixel sizes.

Ink
Pencil