iOS porting: Main screen and compositor

This commit is contained in:
James Babcock committed 2026-09-05 22:59:37 -07:00
1 parent 61b3bf8b7c
commit 99793a37a7
24 files changed
+1124 -70

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
import { GrayImage } from '../graphics/image'
declare const com: any
export function rasterizeSvg(svg: string, size: number, strokeWidth: number): GrayImage | null {
const bytes = com.faceclaw.app.IconRenderer.renderSvgGray(svg, size, strokeWidth)
if (!bytes || bytes.length < size * size) return null
const image = new GrayImage(size, size, 0)
for (let i = 0; i < size * size; i++) image.pixels[i] = bytes[i] & 0xff
return image
}