module Image:sig
..end
Image widget.
type
t
val create : ?width:int ->
?height:int ->
?noscale:bool ->
?bg:Draw.color -> ?angle:float -> 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.
noscale
: if true
, the image will appear at the original hardware
pixel size. By default, noscale=false
and the image is scaled using the
Theme
SCALE
variable.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 Image.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).