Crates.io | simple-canvas |
lib.rs | simple-canvas |
version | 0.1.1 |
source | src |
created_at | 2024-01-30 02:51:34.396899 |
updated_at | 2024-01-30 05:19:46.160936 |
description | A simple generic 2 dimensional canvas struct |
homepage | https://github.com/Remi-Godin/simple-canvas |
repository | https://github.com/Remi-Godin/simple-canvas |
max_upload_size | |
id | 1119763 |
size | 6,598 |
This crate provides a Canvas
struct that is constructed of a single vector, but act as a 2 dimensional matrix. Along with the struct are functions to access its elements by row and column, as well as access to iterators over all elements.
I needed a simple struct to act as a 2 dimensional array, mostly for image creation and manipulation. After some testing, I found that using a single vector, as opposed to a vector of vector, is faster, even with the added operations needed to abstract away the access by column and row. This crate provides just this.