First of all, thanks for this library and its documentation. It's truly high class.
I'm working with the basics examples where there's a grey square and as a target, I want to use svg. I have the following code unable to compile due an error:
open Gg
open Vg
let square i =
let size = Size2.v 30. 30. in
let view = Box2.unit in
let buffer = Buffer.create 2048 in
try
let target = Vgr_svg.target ~xml_decl:true () in
let renderer = Vgr.create target (`Buffer buffer) in
ignore (Vgr.render renderer (`Image (size, view, i)));
ignore (Vgr.render renderer `End);
buffer
with | (Sys_error e) -> (prerr_endline e; buffer)
let gray = I.const (Color.gray 0.5)
let render (_data : Image.t) =
(Lwt.return ((square gray) |> Buffer.contents) : string Lwt.t)
File "_none_", line 1:
Error: No implementations provided for the following modules:
Vgr_svg referenced from source/app/app.cmxa(App__Svg)
I'm not sure what's the issue here, since it fails at compiling but my lsp works fine with Vg.Vgr_svg.
Hi @dbuenzli
First of all, thanks for this library and its documentation. It's truly high class. I'm working with the basics examples where there's a grey square and as a target, I want to use svg. I have the following code unable to compile due an error:
I'm not sure what's the issue here, since it fails at compiling but my lsp works fine with
Vg.Vgr_svg
.