bogue
GUI library for ocaml, with animations, based on SDL2
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Dependency graph
val create :
?width:int ->
?height:int ->
?noscale:bool ->
?bg:Draw.color ->
string ->
t
create "image.jpg"
will load the image "image.jpg"
. The actual load occurs only once, on the first time the image widget is effectively displayed. The image is then stored in a texture. All Sdl_image image formats are supported.
The file "image.png" will be search in the current Theme directory. Absolute paths starting with "/" can also be used.
val create_from_svg :
?width:int ->
?height:int ->
?bg:Draw.color ->
string ->
t
Load an svg image. This requires the rsvg
or rsvg-convert
program.
Remark: With SDL_Image >= 2.0.2, one can use create
to load SVG files, but the size is not correctly handled (the image will be rendered at its 'internal SVG size', and then scaled, which may result in poor accuracy).