Skip to content

Commit

Permalink
fix rsvg examples
Browse files Browse the repository at this point in the history
  • Loading branch information
garrigue committed Jan 31, 2024
1 parent 7601748 commit ba15cfa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 2 additions & 3 deletions examples/dune
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
link_button ; lissajous
nihongo notebook
pango1 pango2
pixview
; pousse
progressbar radiobuttons rpn
; runthread
Expand All @@ -41,15 +40,15 @@
gioredirect giotest hello iconview image kaimono
label link_button lissajous
nihongo notebook
pango1 pango2 pixview pousse progressbar radiobuttons rpn
pango1 pango2 pousse progressbar radiobuttons rpn
runthread
scrolledwin seppala signal_override slide_show socket spin
stackcontainer stackswitcher
testdnd ; testgtk
testthread timer toolbar tooltip tree tree_model tree_store tron
)
(flags :standard -w -3-6-7-10-24-26-27-33-35 -no-strict-sequence)
(libraries lablgtk3 lablgtk3-rsvg2))
(libraries lablgtk3))

(executables
(names spell)
Expand Down
File renamed without changes.
9 changes: 3 additions & 6 deletions examples/rsvg/test_rsvg.ml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ let _ =
end

let pb =
let gz =
Filename.check_suffix !fname ".svgz" ||
Filename.check_suffix !fname ".svg.gz" in
let size_cb = match !zoom with
| None -> None
| Some z -> Some (Rsvg.at_zoom z z) in
Rsvg.render_from_file ~gz ?dpi:!dpi ?size_cb !fname
| Some z -> Some (Rsvg2.at_zoom z z) in
Rsvg2.render_from_file ?dpi:!dpi ?size_cb !fname

let w = GWindow.window ~allow_grow:false ~title:!fname ()
let w = GWindow.window ~title:!fname ()
let i = GMisc.image ~packing:w#add ()

let () =
Expand Down

0 comments on commit ba15cfa

Please sign in to comment.