package stk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Stk.ImageSource

Image widget.

Sourceval keep_ratio : bool Props.prop

Property "image-keep-ratio" to indicate whether image ratio must be perserved. Default is true. Keeping ratio means that when width is set with image#set_width, height of rendered image will be set accordingly. If height is set with image#set_height, width or rendered image will be set accordingly.

Sourceval css_keep_ratio : bool Css.P.prop
Sourceval autosize : bool Props.prop

Property "image-autosize" to indicate whether image must fit in allocated geometry. Default is false.

Sourceval css_autosize : bool Css.P.prop
Sourceclass image : ?classes:string list option -> ?name:string option -> ?props:Props.t option -> ?wdata: Widget.wdata option -> unit -> object ... end

A widget to display an image.

Sourceval image : ?classes:string list -> ?name:string -> ?props:Props.t -> ?wdata:Widget.wdata -> ?width:int -> ?height:int -> ?keep_ratio:bool -> ?autosize:bool -> ?file:string -> ?pack:(Widget.widget -> unit) -> unit -> image

Convenient function to create a image. Optional arguments:

  • width specifies width of rendered image.
  • height specifies height of renderer image.
  • file specifies a file to load an image from.
  • keep_ratio specifies the keep_ratio property.
  • autosize specifies the autosize property.

See Widget arguments for other arguments.

OCaml

Innovation. Community. Security.