Skip to content

Eyes ​

The three finder patterns in the corners are how a scanner finds a code. Each eye is two parts: the outer eye, a ring seven modules across, and the inner eye, the 3×3 block in its middle. They are styled apart, or together as a preset.

php
use ExeQue\Qr\Shapes\Enums\Eye;
use ExeQue\Qr\Shapes\Enums\InnerEye;
use ExeQue\Qr\Shapes\Enums\OuterEye;

Qr::url($url)->eyes(Eye::Heart);                               // a preset
Qr::url($url)->eyes(outer: OuterEye::Soft, inner: InnerEye::Circle);
Qr::url($url)->outer('octagon')->inner('star');
Qr::url($url)->outer(OuterEye::Octagon, cut: 1.5);             // a preset with an option changed

The pictures show the top-left eye close up, with the modules beside it.

Outer eyes ​

squaresoft-squaresoftrounded
squaresoft-squaresoftrounded
circleround-cornersoft-round-cornersquircle
circleround-cornersoft-round-cornersquircle
octagonhexagonleafdrop
octagonhexagonleafdrop
scallopeddotted-ring
scallopeddotted-ring
NameClassOptions
squareOuterEyes\Square—the standard ring
soft-squareOuterEyes\Roundedouter 0.6, hole 0.3
softOuterEyes\Roundedouter 1.9, hole 0.9
roundedOuterEyes\Roundedouter 2.7, hole 1.7
circleOuterEyes\Roundedouter 3.5, hole 2.5a round ring
round-cornerOuterEyes\Roundedouter [0, 0, 0, 3.5], hole [0, 0, 0, 2.5]one round corner, three sharp
soft-round-cornerOuterEyes\Roundedouter [1.9, 1.9, 1.9, 3.5], hole [0.9, 0.9, 0.9, 2.5]one round corner, three soft
squircleOuterEyes\Squircle—a square with soft, full sides
octagonOuterEyes\Octagoncut 1.7, holeCut 1.3corners cut off
hexagonOuterEyes\Hexagon—a regular hexagon, flat top and bottom; its points reach into the light border round the eye
leafOuterEyes\Roundedouter [3, 0, 3, 0], hole [2, 0, 2, 0]two opposite corners round
dropOuterEyes\Roundedouter [3, 3, 3, 0], hole [2, 2, 2, 0]three corners round, one pointed
scallopedOuterEyes\Scallopeddepth 0.15 (up to 0.25), bumps 4 (2 to 8)scalloped sides round a soft hole
dotted-ringOuterEyes\DottedRingdiameter 1.0 (0.8 to 1)a dot on each of the ring's 24 modules

OuterEyes\Rounded takes one radius for every corner, or four: top-right, bottom-right, bottom-left, top-left. Its hole must stay rounded enough that it does not poke through the ring; a radius pair that would is refused.

Inner eyes ​

Shown inside the square outer eye.

squaresoft-squaresoftcircle
squaresoft-squaresoftcircle
round-cornersoft-round-cornersquircleheart
round-cornersoft-round-cornersquircleheart
starflowerdiamondhexagon
starflowerdiamondhexagon
octagonleafdropsparkle
octagonleafdropsparkle
clovercrosspillblob
clovercrosspillblob
NameClassOptions
squareInnerEyes\Square—
soft-squareInnerEyes\Roundedradius 0.5
softInnerEyes\Roundedradius 0.7
circleInnerEyes\Roundedradius 1.5
round-cornerInnerEyes\Roundedradius [0, 0, 0, 1.5]
soft-round-cornerInnerEyes\Roundedradius [0.7, 0.7, 0.7, 1.5]
squircleInnerEyes\Squircle—
heartInnerEyes\Heart—
starInnerEyes\Star—
flowerInnerEyes\Flower—
diamondInnerEyes\Diamond—
hexagonInnerEyes\Hexagon—
octagonInnerEyes\Octagoncut 0.88
leafInnerEyes\Roundedradius [1.3, 0, 1.3, 0]
dropInnerEyes\Roundedradius [1.3, 1.3, 1.3, 0]
sparkleInnerEyes\Sparkle— a full four-pointed sparkle
cloverInnerEyes\Clover—
crossInnerEyes\Cross— a plus with broad bars
pillInnerEyes\Pillvertical true: standing up, or lying down
blobInnerEyes\Blobamount 0.08 (up to 0.15), seed 1

The star, diamond, hexagon, sparkle, cross and pill reach a little past the 3×3 box where they are narrow, so a line across the middle still measures about three modules.

Presets ​

squareroundround-cornersoft-square
squareroundround-cornersoft-square
dotroundedmixheart
dotroundedmixheart
soft-round-cornersquirclehexagonoctagon
soft-round-cornersquirclehexagonoctagon
leafdropsparklescalloped
leafdropsparklescalloped
organic
organic
PresetOuterInner
squaresquaresquare
roundsquarecircle
round-cornerround-cornerround-corner
soft-squaresoft-squaresoft-square
dotcirclecircle
roundedsoftsoft
mixroundedsoft
heartsoft-round-cornerheart
soft-round-cornersoft-round-cornersoft-round-corner
squirclesquirclesquircle
hexagonhexagonhexagon
octagonoctagonoctagon
leafleafleaf
dropdropdrop
sparklesoftsparkle
scallopedscallopedcircle
organicsoftblob

Eye cases are also ProvidesQrEye, as is anything of your own that gives an outer and an inner eye.

Turned to point out ​

Eye parts whose corners differ - round-corner, soft-round-corner, drop, leaf, heart, and rounded shapes of your own with uneven corners - turn by themselves on each corner, so their distinct corner points out of the code on all three eyes: the top-right a quarter clockwise, the bottom-left a quarter back.

Turned on each corner

mirrored() turns every other eye part the same way, for shapes of your own that should point out too:

php
Qr::url($url)->eyes('my-arrow')->mirrored();

A shape of your own turns by itself when it implements Shapes\Contracts\Directional and says it is.

One corner at a time ​

php
use ExeQue\Qr\Rendering\Enums\Corner;

Qr::url($url)
    ->eyes(Eye::Rounded)
    ->eye(Corner::TopLeft, Eye::Heart, paint: '#be123c')
    ->eye(Corner::BottomLeft, rotate: 90);

Eyes in their own color

The eye-tilt, eye-size and eye-paint filters change eyes too. The scan guards keep an outer eye about seven modules wide, and warn about turns that are not quarter turns, which distort the pattern scanners look for.

Every preset on a code ​

squareroundround-cornersoft-squaredotroundedmixheartsoft-round-cornersquirclehexagonoctagonleafdropsparklescallopedorganic

Eyes of your own ​

An outer eye implements ExeQue\Qr\Shapes\Contracts\OuterEyeShape, an inner eye InnerEyeShape. See Extending for the geometry they must keep to.