News
Welcome to NeoRHDN! This place is still a work-in-progress, so pardon the construction...

Chat on Discord
Views: 1,781,916
Main | Rules/FAQ | Discord | Memberlist | Latest posts | Stats | Ranks | Online users
08-20-25 08:51 AM
Guest: Register | Login

0 users currently in Works in Progress | 1 bot

Main - Works in Progress - SVG Is Hard


Zoinkity
Posted on 08-20-25 03:33 AM, in Link | ID: 1616

Gator

Level: 11

Posts: 40/40
EXP: 4436
Next: 1549

Since: 10-16-24

Last post: 5 hours
Last view: 2 hours
Golf courses are flat [citation needed] and have been messing around with automatically generating map images as SVGs from their models.

So all well and good? Not quite.
If we're going to be realistic here, they have to be piped into an outside editor.

1) Rotation will clip off the edges (as seen above!) unless the bounding box is precomputed and piped into the viewBox, but that doesn't account for how much is actually used image data. Other option is to use scaling to compensate, but aegh that's annoying. Fitting and centering is equally frustrating.
2) Hole maps sort of need their own clipped bounds post-rotation so yay more math.
3) Rendering a shadow 100% duplicates the image. That would need to be translated on a global metric, not in user space.

So yeah, math is hard but batch operations in image editors are not. Automation is kinda necessary. There are ~5000 of these things after all and each needs a minimum of three images, usually four.
(Crazysauce you can just copy an SVG into a message...minus 10000 chars of circles though.)

Main - Works in Progress - SVG Is Hard

Affiliates:


Acmlmboard v2.5.6+neo (2024-08-13)
© 2005-2025 Acmlm, Emuz, NinCollin, et al.

Page rendered in 0.051 seconds. (965KB of memory used)
MySQL - queries: 47, rows: 397/406, time: 0.041 seconds.