Builds bitmaps. A bitmap of pixels is centered at the origin with its anchor there, in the middle of its pixels, and a bitmap of a picture covers the whole pixels the picture's bounds touch, anchored where the picture is.
Attributes
- Companion
- class
- Source
- Element.scala
- Graph
-
- Supertypes
- Self type
-
Bitmap.type
Members list
Value members
Concrete methods
A bitmap of width by height pixels whose colors generator gives by column and row.
A bitmap of width by height pixels whose colors generator gives by column and row.
import smile.colors.Color
val plaid = Bitmap(120, 80, (x, y) => Color(x * 2, y * 3, 160))

Attributes
- Source
- Element.scala
A bitmap of width by height pixels of colors, row by row from the top.
A bitmap of width by height pixels of colors, row by row from the top.
Attributes
- Source
- Element.scala
A bitmap of the image at the resource path path, which may also be a file path or a URL. In a browser, the image must have been loaded with smile.pictures.Bitmap.load first.
A bitmap of the image at the resource path path, which may also be a file path or a URL. In a browser, the image must have been loaded with smile.pictures.Bitmap.load first.
Attributes
- Source
- Element.scala
A bitmap of picture rendered at once with settings, as toBitmap renders it.
A bitmap of picture rendered at once with settings, as toBitmap renders it.
Attributes
- Source
- Element.scala
Exports
Defined exports
A bitmap of packed ARGB pixels in rows from the top. The pixels are copied, so later changes to the array do not affect the bitmap.
A bitmap of packed ARGB pixels in rows from the top. The pixels are copied, so later changes to the array do not affect the bitmap.
Attributes
- Throws
-
IllegalArgumentException
if a dimension is not positive, their product does not fit in an
Int, or there are not exactlywidth * heightpixels - Source
- Rasters.scala
A bitmap of packed ARGB pixels that generator gives by column and row, called once per pixel, from left to right in each row, top row first. No Color is made per pixel.
A bitmap of packed ARGB pixels that generator gives by column and row, called once per pixel, from left to right in each row, top row first. No Color is made per pixel.
Attributes
- Throws
-
IllegalArgumentException
if a dimension is not positive or their product does not fit in an
Int - Source
- Rasters.scala
Loads the image at path asynchronously, on every platform. In a browser it is the only way to load an image the first time, because decoding there is asynchronous, and afterwards the synchronous apply serves the same path.
Loads the image at path asynchronously, on every platform. In a browser it is the only way to load an image the first time, because decoding there is asynchronous, and afterwards the synchronous apply serves the same path.
Attributes
- Source
- Rasters.scala
A bitmap of source where source lies, anchored in the middle of its pixels.
A bitmap of source where source lies, anchored in the middle of its pixels.
Attributes
- Source
- Rasters.scala
A bitmap of picture, rendered only when its pixels are asked for, with the settings of the output that asks. A Direct output renders the picture at its own scale, so it stays sharp. The bitmap covers the whole pixels the picture's bounds touch, and its anchor is where the picture's anchor is.
A bitmap of picture, rendered only when its pixels are asked for, with the settings of the output that asks. A Direct output renders the picture at its own scale, so it stays sharp. The bitmap covers the whole pixels the picture's bounds touch, and its anchor is where the picture's anchor is.
Attributes
- Source
- Rasters.scala
