sportloha.blogg.se

Sugarworks sundowner imagepack
Sugarworks sundowner imagepack






sugarworks sundowner imagepack

The number of elements in this table implies the width of the source image ( w * #names), unless columns is defined. The default list of icon names that are assigned to each subimage in the strip. rtk.add_image_search_path() is respected. The name of the packed image file to read. These fields are supported in the provided attrs table, most of which allow settingĭefault values for the strips that follow: Field The same resolution, density, and optionally, a A strip is a horizontal band across theįull width of the given packed image that consists of one or more subimages each with unnamed) elements that defineĮach strip of the image, from top to bottom.

#Sugarworks sundowner imagepack plus

Image file being read, plus one or more positional (i.e. This method receives an attrs table that act as keyword arguments for the overall only one dimension (w or h) is passed, the subimage is assumed to be square.Īdds a new underlying packed image to the ImagePack and defines one or more strips as positional elements in the table we're passing to add(). Now define the 6 different strips in the packed image. They will automatically be recolored to white if we get() a light style. Default all strips to the 'dark' style because all the icons are black. Find icons.png in all the image search paths The naming convention is entirely your choice. for this as we'll be reusing these names in multiple strips, so it avoids Define a table with our icon names which we'll use later. We can describe the above packed image like so: - Say we have an 'images/' directory relative to the current script. Here the medium size has 3 icons, the large size has 2 icons. Of 2*3=6 strips in our packed image, because each strip must have a distinct size, density,Īnd style. With 2 icon sizes, and 3 different pixel densities per icon size, we will need a total High-DPI variants for these different use cases. While the large icons would be used for section headers, but you'd still want Is different than size: perhaps the medium sized icons would be used for buttons, Suppose we want to create an image pack with "medium" and "large" sized icons, withīoth those sizes at 1x, 1.5x and 2x densities for higher DPI display. () simply calls rtk.ImagePack:get() under the hood.) Example Works with () after register_as_icons() is called (because (Unless of course you also include a strip with aĭark variant, in which case that would be returned directly.) This behavior likewise Light style and subsequently ask get() for the dark style, it will beĪutomatically recolored to black. Subimage recoloring is also handled: for example, if you register a strip with the () when it receives a string can access images from the ImagePack.įor example,, ,, etc. Consequently, any widget attribute that implicitly calls Register_as_icons() may then be called, which allows accessing the named subimages Once all image files have been added and their respective strips defined, ), the images within the interface adapt to pick the best resolution UI scales up (such as through system DPI changes, or direct setting of This provides a convenient means of creating scalable UIs with adaptive images: as the Rtk (because rtk.MultiImage is just a subclass of rtk.Image). An rtk.MultiImage is returned encapsulating all theĭensities for that image name, which can be use anywhere an rtk.Image is used within myimage:large) to select amongĭifferent size variants.

sugarworks sundowner imagepack

Names may also be qualified with a size suffix (e.g. Rtk.ImagePack:get() with the name of the subimage (and, optionally, the style). Once constructed, subimages can be fetched from the ImagePack by calling

sugarworks sundowner imagepack

Have a different density, size, and/or style. Multiple subimages can exist within the image pack using the same name, as long as they Packed image that consists of one or more subimages each with the same resolution, A strip is a horizontal band across the width of the given Image packs allow distributing a smaller number of image files with your application.Īn image pack contains one or more image files added via add(), where each file isĬomprised of strips. Manages a single image composed of a collection of smaller images, also known








Sugarworks sundowner imagepack