X ray icon

New Added in v0.4.0

A free pencil-style x ray icon, drawn by code from 1 rectangle, 1 line and 8 curves. Use it as an SVG, a React component, or by name. MIT licensed.

x-ray

01Use it

Use x-ray

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 { XRay } from '@matita/icons/react';

<XRay size={24} />

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

JavaScript

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

toSvg(XRay, { 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-x-ray" data-sketch="" aria-hidden="true"><path d="M3.04 3.44Q12.21 4.01 21.38 3.63M20.43 2.36Q20.87 11.79 20.46 21.23M21.12 20.43Q11.89 20.21 2.65 20.48M3.55 22.2Q3.95 12.41 3.48 2.63" stroke-width="1.664"/><path d="M11.81 5.38Q11.83 11.83 12.16 18.29" stroke-width="1.504"/><path d="M11.4 7.19Q9.57 5.63 7.64 6.74" stroke-width="1.808"/><path d="M11.08 9.98Q7.96 9.7 7.66 12.08" stroke-width="1.424"/><path d="M10.98 13.02Q7.77 13.07 7.42 15.78" stroke-width="1.408"/><path d="M11.07 16.52Q8.68 16.39 9.15 19.06" stroke-width="1.472"/><path d="M13.03 6.99Q14.43 5.58 16.07 7.05" stroke-width="1.44"/><path d="M13.06 9.97Q16.03 9.98 16.52 12.2" stroke-width="1.504"/><path d="M12.94 13.13Q16.24 13.09 16.63 15.83" stroke-width="1.728"/><path d="M13.17 16.32Q15.34 16.24 15.16 18.85" stroke-width="1.68"/></svg>

Pencil variant

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

<XRay size={32} pencil />

The file is icons/x-ray.svg in the package (pencil/x-ray.svg for the pencil variant). Matita 0.4.0.

02How it's drawn

The recipe for x-ray

X ray is not stored as a drawing. It is a recipe of 1 rectangle, 1 line and 8 curves 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
R 3.5 3.5 17 17;
L 12 6 12 18;
Q 11 7 9.6 5.6 8 6.8;
Q 10.8 9.8 8 9.8 7.6 12;
Q 10.8 13.2 7.6 13.2 7.6 15.4;
Q 10.8 16.4 8.6 16.4 9 18.6;
Q 13 7 14.4 5.6 16 6.8;
Q 13.2 9.8 16 9.8 16.4 12;
Q 13.2 13.2 16.4 13.2 16.4 15.4;
Q 13.2 16.4 15.4 16.4 15 18.6
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 x-ray. Seed 0 is the default.

wobble 0
wobble 0.25
wobble 0.5
wobble 0.75
wobble 1

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

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

True pixel sizes.

Ink
Pencil