Source File
svg_surface_resources.go
Belonging Package
github.com/pancsta/d2/d2renderers/d2isometric/d2isometricimg
package d2isometricimgimport// One retained surface can cover hundreds of mesh triangles and also cast a// shadow. Serialize its vectors once per export, then reuse the same definition// through each geometry/lighting transform; paper patterns stay vector artwork.func ( *nativeSVGWriter) ( *nativeVectorSurface) string {if .err != nil {return ""}if .surfaces == nil {.surfaces = make(map[*nativeVectorSurface]string)}if := .surfaces[]; != "" {return}:= fmt.Sprintf("surface-%d", len(.surfaces)), := nativeSurfaceSVG(.ctx, , +"-")if != nil {.err =return ""}.write(`<defs><g id="%s">%s</g></defs>`, , )if .err != nil {return ""}.surfaces[] =return}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |