diff --git a/common/icons.tsx b/common/icons.tsx index c8691f9..150f57c 100644 --- a/common/icons.tsx +++ b/common/icons.tsx @@ -27,6 +27,10 @@ import IconPrinter from "tabler_icons_tsx/tsx/printer.tsx"; import IconSettings from "tabler_icons_tsx/tsx/settings.tsx"; import IconMinus from "tabler_icons_tsx/tsx/minus.tsx"; import IconClipboardPlus from "tabler_icons_tsx/tsx/clipboard-plus.tsx"; +import IconGridDots from "tabler_icons_tsx/tsx/grid-dots.tsx"; +import IconBrush from "tabler_icons_tsx/tsx/brush.tsx"; +import IconCircles from "tabler_icons_tsx/tsx/circles.tsx"; +import IconGrain from "tabler_icons_tsx/tsx/grain.tsx"; import { INL_ICON_COLOR, INL_ICON_SIZE } from "./constants.ts"; export const Icons = { @@ -59,6 +63,10 @@ export const Icons = { IconSettings, IconMinus, IconClipboardPlus, + IconGridDots, + IconBrush, + IconCircles, + IconGrain, }; for (const key in Icons) { diff --git a/common/types.ts b/common/types.ts index fe10526..8fd505b 100644 --- a/common/types.ts +++ b/common/types.ts @@ -15,7 +15,7 @@ export interface StuffData { /* TODO: better way than such a trigger? */ triggerPaste?: boolean; - dither?: 'pic' | 'pattern' | 'text'; + dither?: 'steinberg' | 'bayer' | 'atkinson' | 'pattern' | 'text'; rotate?: 0 | 90 | 180 | 270; flipH?: boolean; flipV?: boolean; @@ -68,7 +68,7 @@ export interface StuffPainterProps { export interface ImageWorkerMessage { id: number; - dither: 'pic' | 'pattern' | 'text'; + dither: 'steinberg' | 'bayer' | 'atkinson' | 'pattern' | 'text'; rotate: 0 | 90 | 180 | 270; flip: 'none' | 'h' | 'v' | 'both'; brightness: number; diff --git a/components/StuffWidget.tsx b/components/StuffWidget.tsx index 75e61be..86638cd 100644 --- a/components/StuffWidget.tsx +++ b/components/StuffWidget.tsx @@ -105,7 +105,7 @@ export default function StuffWidget(props: StuffProps) { if (blob === null) return; if (!['pic'].includes(stuff.type)) { stuff.type = 'pic'; - stuff.dither = 'pic'; + stuff.dither = 'steinberg'; } const url = URL.createObjectURL(blob); use_pic(url).then(() => URL.revokeObjectURL(url)); @@ -122,7 +122,7 @@ export default function StuffWidget(props: StuffProps) { stuff.dither = 'text'; break; case 'pic': - stuff.dither = 'pic'; + stuff.dither = 'steinberg'; break; } dispatch({ action: 'modify', stuff: stuff }); @@ -232,12 +232,30 @@ export default function StuffWidget(props: StuffProps) { >; options = <>