Returns the color type of the specified view. By convention, colors are structs with numeric fields named after the channel they indicate.
Return a view of src with both coordinates inverted.
Return a view of src with the x coordinate inverted.
Returns a view which inverts all channels.
Return a view of src with the y coordinate inverted.
This is the type used for image sizes and coordinates. Rationale: - Signed, because operations with image coordinates often involve subtraction, and subtraction with unsigned numbers often leads to trouble. - Same size as size_t, in order to use the CPU word size and enable seamless interoperability with the .length property of arrays / ranges.
Optionally, a view can also provide direct pixel access. We call these "direct views".
A view is any type which provides a width, height, and can be indexed to get the color at a specific coordinate.
Views can be read-only or writable.
Alpha-blend a number of views. The order is bottom-to-top.
Blits a view onto another. The views must have the same size.
Helper function to blit an image onto another at a specified location.
Add a solid-color border around an image. The parameters indicate the border's thickness around each side (left, top, right, bottom in order).
Crop a view to the specified rectangle.
Swap the X and Y axes (flip the image diagonally).
Present a resized view using nearest-neighbor interpolation.
Return a 1x1 view of the specified color. Useful for testing.
Overlay the view fg over bg at a certain coordinate. The resulting view inherits bg's size.
Rotate a view at an arbitrary angle (specified in radians), around the specified point. Rotated points that fall outside of the specified view resolve to defaultColor.
Rotate a view at an arbitrary angle (specified in radians) around its center.
Rotate a view 90 degrees counter-clockwise.
Rotate a view 90 degrees clockwise.
Default implementation for the .size method. Asserts that the view has the desired size.
Returns a view of the specified dimensions and same solid color.
Tile another view.
Return a view with the given views concatenated vertically. Assumes all views have the same width. Creates an index for fast row -> source view lookup.
Mixin which implements view primitives on top of existing direct view primitives.
Similar to Warp, but allows warped coordinates to go out of bounds.
Mixin which implements view primitives on top of another view, using a coordinate transform function.
Get the storage type of a direct view.
Return a view which applies a predicate over the underlying view's pixel colors.
Two-way colorMap which allows writing to the returned view.
Splits a view into segments and calls fun on each segment in parallel. Returns an array of segments which can be joined using vjoin or vjoiner.
Returns a view which calculates pixels on-demand using the specified formula.
Returns the smallest window containing all pixels that satisfy the given predicate.
Return a view of src with the coordinates transformed according to the given formulas
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Image maps.