2 ms·
How is the area computed? Are they counting pixels? Constructive solid geometry, and then some sort of computer graphics algorithm for area? Or is it an SVG,
by iamwil 3y ago
How is the area computed? Are they counting pixels?
Constructive solid geometry, and then some sort of computer graphics algorithm for area?
Or is it an SVG, and they're doing some sort of complex integral? (<--probably not)
- salamanderman 3y agoI'd guess SVG. It's not a complex integral. They can do a boolean intersection in SVG.
- dvh 3y agoThey are probably counting pixels but you could for example use destination-out compositing operation on canvas and resize to 1x1 pixel and read brightness of single pixel.
- michaelkaufman 3y agoI had to check. It's Next.js /React and the images are all CSS using Chakra. Just looking at the payload, it's sending the byte sizes which tells me they are counting bytes and checking for the difference. Pretty clever.