import { paint } from '../material/paint' /** * The marks Lux scatters behind a band. * * Five drawings from the brand's own set, laid around the first panel of a page * so the band reads as a place rather than as a rectangle. They carry no * meaning and no label: a reader is not meant to identify them, only to notice * that the page has a hand in it. * * Each is drawn twice. The lower path is the ground the mark sits on and the * upper is the mark at `paint.faint`, which is what keeps one shape reading the * same where it crosses a panel and where it crosses the page behind — a * translucent mark alone changes value under every edge it passes. * * The paths are the brand's, at the viewBox each was drawn in. Nothing is * redrawn here: a mark redrawn from memory is a different mark. */ const SHAPES = { /** An arch on a bowl. */ arch: { box: '0 0 16 16', d: ['M2 3C5.31371 3 8 5.68629 8 9C8 5.68629 10.6863 3 14 3L14 9C14 12.3137 11.3137 15 8 15C4.68629 15 2 12.3137 2 9V3Z'], }, /** Twelve petals around a centre. */ bloom: { box: '0 0 64 65', d: ['M21.2417 22.1187C22.0242 21.909 22.3522 20.9808 21.9078 20.3035C21.1235 19.1078 20.5496 18.0381 20.331 17.2223C19.1959 12.9859 21.5122 8.68428 25.5046 7.61451C29.4971 6.54473 33.6539 9.11185 34.789 13.3483C35.0076 14.164 35.0455 15.3772 34.9641 16.8046C34.918 17.6136 35.6663 18.2536 36.449 18.0439C36.7845 17.954 37.0605 17.7173 37.2088 17.4033C37.8048 16.1407 38.4029 15.1238 38.9709 14.5387C41.9495 11.4703 46.7595 11.4491 49.7142 14.4914C52.669 17.5337 52.6496 22.4874 49.6709 25.5559C48.8543 26.3972 47.171 27.3028 45.1577 28.1742C44.7574 28.3474 44.54 28.7863 44.6529 29.2076C44.7657 29.629 45.1735 29.9003 45.6068 29.8502C47.7861 29.5982 49.6966 29.5409 50.8245 29.8611C54.9383 31.0292 57.432 35.3095 56.3943 39.4216C55.3565 43.5337 51.1804 45.9203 47.0666 44.7523C46.2821 44.5295 45.2558 43.948 44.1083 43.1526C43.8229 42.9547 43.4655 42.8877 43.13 42.9776C42.3473 43.1873 42.0192 44.1158 42.4637 44.7934C43.2478 45.9888 43.8216 47.0584 44.0402 47.8741C45.1754 52.1106 42.8591 56.4122 38.8666 57.4819C34.8741 58.5517 30.7174 55.9846 29.5822 51.7481C29.3636 50.9323 29.3258 49.719 29.4072 48.2914C29.4533 47.4826 28.7051 46.8428 27.9227 47.0524C27.5873 47.1423 27.3114 47.3789 27.1632 47.6929C26.5671 48.9555 25.969 49.9723 25.401 50.5574C22.4224 53.6259 17.6124 53.6471 14.6577 50.6048C11.7029 47.5625 11.7223 42.6088 14.701 39.5403C15.5177 38.699 17.201 37.7934 19.2143 36.9219C19.6146 36.7487 19.832 36.3099 19.7191 35.8886C19.6063 35.4673 19.1985 35.196 18.7653 35.2461C16.586 35.4981 14.6754 35.5555 13.5474 35.2352C9.43362 34.0672 6.93996 29.7868 7.97769 25.6747C9.01542 21.5627 13.1916 19.1761 17.3054 20.3441C18.0898 20.5668 19.1162 21.1484 20.2637 21.9438C20.549 22.1416 20.9063 22.2086 21.2417 22.1187Z'], }, /** A wheel of spokes, cropped by its own box. */ spoke: { box: '0 0 70 37', d: ['M39.3511 -24.2553C39.3511 -26.6703 37.3935 -28.6279 34.9785 -28.6279C32.5636 -28.6279 30.606 -26.6703 30.606 -24.2553V-20.528C30.606 -18.6743 28.2919 -19.009 27.5034 -20.6866C26.5611 -22.6914 25.6087 -24.306 24.6986 -25.2161C20.0992 -29.8155 12.5837 -29.7573 7.91238 -25.086C3.24106 -20.4146 3.1828 -12.8992 7.78226 -8.29974C8.69232 -7.38968 10.307 -6.43729 12.3118 -5.49495C13.9894 -4.70642 14.324 -2.39239 12.4704 -2.39239H8.743C6.32809 -2.39239 4.37041 -0.434717 4.37041 1.9802C4.37041 4.39511 6.32809 6.35279 8.743 6.35279H12.4704C14.324 6.35279 13.9894 8.66682 12.3118 9.45535C10.307 10.3977 8.69232 11.3501 7.78226 12.2601C3.1828 16.8596 3.24106 24.375 7.91238 29.0464C12.5837 33.7177 20.0992 33.7759 24.6986 29.1765C25.6087 28.2664 26.5611 26.6518 27.5034 24.6469C28.2919 22.9693 30.606 22.6347 30.606 24.4884V28.2157C30.606 30.6306 32.5636 32.5883 34.9785 32.5883C37.3935 32.5883 39.3511 30.6306 39.3511 28.2157V24.4884C39.3511 22.6347 41.6652 22.9693 42.4537 24.6469C43.396 26.6518 44.3484 28.2664 45.2585 29.1765C49.8579 33.7759 57.3734 33.7177 62.0447 29.0464C66.716 24.375 66.7743 16.8596 62.1748 12.2601C61.2648 11.3501 59.6501 10.3977 57.6453 9.45535C55.9677 8.66682 55.633 6.35279 57.4867 6.35279H61.2141C63.629 6.35279 65.5867 4.39511 65.5867 1.9802C65.5867 -0.434717 63.629 -2.39239 61.2141 -2.39239H57.4867C55.633 -2.39239 55.9677 -4.70642 57.6453 -5.49495C59.6501 -6.43729 61.2648 -7.38968 62.1748 -8.29974C66.7743 -12.8992 66.716 -20.4146 62.0447 -25.086C57.3734 -29.7573 49.8579 -29.8155 45.2585 -25.2161C44.3484 -24.306 43.396 -22.6914 42.4537 -20.6865C41.6652 -19.0089 39.3511 -18.6743 39.3511 -20.528V-24.2553Z'], }, /** Four arms, waisted. The mark an account wears. */ spark: { box: '0 0 26 26', d: ['M8.9375 12.6573C8.9375 12.172 8.62234 11.744 8.16133 11.5925C5.97172 10.873 3.69538 9.98205 2.89295 9.17963C1.18364 7.47032 1.20529 4.67733 2.94132 2.94131C4.67733 1.20529 7.47033 1.18364 9.17966 2.89295C9.98206 3.69537 10.873 5.97171 11.5925 8.16133C11.744 8.62234 12.1721 8.9375 12.6573 8.9375H13.3427C13.8279 8.9375 14.256 8.62234 14.4075 8.16133C15.127 5.97171 16.0179 3.69537 16.8203 2.89295C18.5297 1.18364 21.3227 1.20529 23.0587 2.94131C24.7947 4.67733 24.8164 7.47032 23.1071 9.17963C22.3046 9.98205 20.0283 10.873 17.8387 11.5925C17.3777 11.744 17.0625 12.172 17.0625 12.6573V13.3427C17.0625 13.828 17.3777 14.256 17.8387 14.4075C20.0283 15.127 22.3046 16.018 23.1071 16.8204C24.8164 18.5297 24.7947 21.3227 23.0587 23.0587C21.3227 24.7947 18.5297 24.8164 16.8203 23.107C16.0179 22.3046 15.127 20.0283 14.4075 17.8387C14.256 17.3777 13.828 17.0625 13.3427 17.0625H12.6573C12.1721 17.0625 11.744 17.3777 11.5925 17.8387C10.873 20.0283 9.98206 22.3046 9.17966 23.107C7.47033 24.8164 4.67733 24.7947 2.94132 23.0587C1.20529 21.3227 1.18364 18.5297 2.89295 16.8204C3.69536 16.018 5.97171 15.127 8.16133 14.4075C8.62234 14.256 8.9375 13.828 8.9375 13.3427V12.6573Z'], }, /** Two leaves, one under the other. */ leaf: { box: '0 0 16 16', d: [ 'M15 2C15 5.86599 11.866 9 8 9C4.13401 9 1 5.86599 1 2H4.5C6.433 2 8 3.567 8 5.5C8 3.567 9.567 2 11.5 2H15Z', 'M1 9C1 12.866 4.13401 16 8 16C11.866 16 15 12.866 15 9H11.5C9.567 9 8 10.567 8 12.5C8 10.567 6.433 9 4.5 9H1Z', ], }, /** Two squares, offset on the diagonal. */ step: { box: '0 0 16 16', d: [ 'M15 2C15 1.44772 14.5523 1 14 1H9C8.44772 1 8 1.44772 8 2V8H14C14.5523 8 15 7.55228 15 7V2Z', 'M8 8H2C1.44771 8 1 8.44772 1 9V14C1 14.5523 1.44772 15 2 15H7C7.55228 15 8 14.5523 8 14V8Z', ], }, /** A disc with the spark cut out of it. */ seal: { box: '0 0 67 67', rule: true, d: [ 'M26.3303 59.7769C11.8818 55.9054 3.30734 41.054 7.17882 26.6054C11.0503 12.1569 25.9017 3.58243 40.3502 7.45392C54.7988 11.3254 63.3733 26.1768 59.5018 40.6253C55.6303 55.0739 40.7789 63.6484 26.3303 59.7769ZM37.7215 17.2645C35.4639 16.6596 33.1434 17.9993 32.5385 20.2569C31.3286 24.7721 26.6876 27.4516 22.1724 26.2418C19.9148 25.6368 17.5943 26.9766 16.9894 29.2342C16.3845 31.4918 17.7242 33.8123 19.9818 34.4172C24.497 35.6271 27.1765 40.2681 25.9667 44.7833C25.3617 47.0409 26.7015 49.3614 28.9591 49.9663C31.2167 50.5712 33.5372 49.2315 34.1421 46.9739C35.352 42.4587 39.993 39.7792 44.5082 40.989C46.7658 41.594 49.0863 40.2542 49.6912 37.9966C50.2961 35.739 48.9564 33.4185 46.6988 32.8136C42.1836 31.6037 39.5041 26.9627 40.7139 22.4475C41.3189 20.1899 39.9791 17.8694 37.7215 17.2645Z', ], }, /** Eight discs around a ninth. */ dial: { box: '0 0 16 16', d: [ 'M7.99948 0C6.89491 7.11679e-05 5.99954 0.895559 5.99961 2.00013C5.99968 3.1047 6.8957 4.00007 8.00027 4C9.10484 4.00007 10.0003 3.1047 10.0004 2.00013C10.0005 0.895559 9.1051 7.11679e-05 8.00053 0H7.99948Z', 'M13.6565 2.34278C12.8754 1.56178 11.6091 1.56186 10.8281 2.34296C10.0471 3.12406 10.0475 4.39076 10.8286 5.17176C11.6096 5.95286 12.8759 5.95294 13.657 5.17194C14.4381 4.39094 14.4382 3.12461 13.6572 2.34352L13.6565 2.34278Z', 'M5.17177 5.17139C5.95287 4.39039 5.95295 3.12406 5.17195 2.34296C4.39095 1.56186 3.12462 1.56178 2.34352 2.34278L2.34278 2.34352C1.56179 3.12462 1.56187 4.39094 2.34297 5.17194C3.12407 5.95294 4.39077 5.95249 5.17177 5.17139Z', 'M4.00001 7.99973C4.00008 6.89516 3.10471 5.99968 2.00014 5.9996C0.895567 5.99953 7.87973e-05 6.89491 7.62939e-06 7.99948V8.00052C7.87973e-05 9.10509 0.895567 10.0005 2.00014 10.0004C3.10471 10.0003 4.00008 9.1043 4.00001 7.99973Z', 'M16 7.99948C15.9999 6.89491 15.1044 5.99953 13.9999 5.99961C12.8953 5.99968 11.9999 6.8957 12 8.00027C11.9999 9.10484 12.8953 10.0003 13.9999 10.0004C15.1044 10.0005 15.9999 9.10509 16 8.00052V7.99948Z', 'M5.1714 10.8282C4.3904 10.0471 3.12407 10.0471 2.34297 10.8281C1.56187 11.6091 1.56179 12.8754 2.34278 13.6565L2.34352 13.6572C3.12462 14.4382 4.39095 14.4381 5.17195 13.657C5.95295 12.8759 5.95249 11.6092 5.1714 10.8282Z', 'M13.6572 13.6565C14.4382 12.8754 14.4381 11.6091 13.657 10.8281C12.8759 10.0471 11.6092 10.0475 10.8282 10.8286C10.0471 11.6096 10.0471 12.8759 10.8281 13.657C11.6091 14.4381 12.8754 14.4382 13.6565 13.6572L13.6572 13.6565Z', 'M7.99974 12C6.89517 11.9999 5.99968 12.8953 5.99961 13.9999C5.99954 15.1044 6.89491 15.9999 7.99948 16H8.00053C9.1051 15.9999 10.0005 15.1044 10.0004 13.9999C10.0003 12.8953 9.10431 11.9999 7.99974 12Z', 'M8.00001 11C9.65686 11 11 9.65685 11 8C11 6.34315 9.65686 5 8.00001 5C6.34315 5 5.00001 6.34315 5.00001 8C5.00001 9.65685 6.34315 11 8.00001 11Z', ], }, } as const export type Emblem = keyof typeof SHAPES export function Emblem({ of, size, /** Faint over a knockout, which is how one is set behind a page's material. * Solid is a mark somebody is meant to look at. */ behind = false, /** * Quarter turns clockwise, where the scattering sets one on its side. * * The reference lays the same eight marks around a band at the angle each one * happens to be at, and the arch behind the portfolio's leading edge is a * quarter turn from the arch it draws upright elsewhere. A rotated mark is * the mark; a second path drawn at the angle is a second drawing that can * drift from the first. */ turn = 0, }: { of: Emblem size: number behind?: boolean turn?: 0 | 1 | 2 | 3 }) { const it = SHAPES[of] // Even-odd where a shape is one path with a void in it. Under the default // winding the void fills, and the disc the reference cuts a spark out of // comes out solid. const rule = 'rule' in it ? ('evenodd' as const) : undefined return ( ) }