MCPcopy Create free account

hub / github.com/bexxmodd/paleatra / functions

Functions36 in github.com/bexxmodd/paleatra

↓ 3 callersMethodget_dimensions
Get the image dimensions of this image buffer in a form of tuple
src/picture.rs:73
↓ 3 callersMethodincrement_count
Increment the color's count by one
src/colors.rs:49
↓ 3 callersMethodmeasure_distance
Measure the distance from this color to other color. Distance is measure of how distinct is the other color from this. If this color is red and the ot
src/colors.rs:65
↓ 2 callersMethodget_buffer
(&self)
src/picture.rs:239
↓ 2 callersFunctionget_colors_from
Generate ColorCount struct and calculates the number of occurrences of each color in a given image each image. # Arguments 'img' - A `DynamicImage` t
src/utils.rs:50
↓ 2 callersFunctionget_most_freq
Grabs the `n` most frequently present elements from the Binary Tree Map # Arguments set - Which is a tree set of ColorCount struct n - how many most
src/utils.rs:20
↓ 2 callersMethodrotate_90degrees
Rotates palette image by 90 degrees.
src/picture.rs:62
↓ 1 callersMethodcmp
(&self, other: &Self)
src/colors.rs:83
↓ 1 callersMethodcombine_pieces
Overlays the palette buffer on top of this buffer. This is done on an empty space preserved for palette boxes. # Arguments palette - image buffer tha
src/picture.rs:213
↓ 1 callersMethodcopy_img_into
Copies supplied dynamic image into this image buffer, while preserving the allocated space for frame borders # Arguments size - of the frame image -
src/picture.rs:167
↓ 1 callersMethodfill_in_palette
(&mut self, top_colors: Vec<&ColorCount>)
src/picture.rs:200
↓ 1 callersMethodpaint_palette
Pains the palette with `n` boxes for top `n` colors. Algorithm fills the boxes with colored pixels and makes jumps between colored boxes with empty sp
src/picture.rs:44
↓ 1 callersMethodsave_img
Saves current buffer as an image. Image format will be set based on the provided path, which is expected to include the name of the new file. # Argum
src/utils.rs:103
Method_set_layers_divider
Functions computes and sets the divider point for buffer and palette layers # Arguments placement - where palette is expected to be placed height - o
src/picture.rs:149
Methodcompute_palette_size
Calculate the size of each color box for palette layer. Each box is a square and includes the space for a pillar, that divides boxes # Arguments leng
src/picture.rs:194
Methodeq
(&self, other: &Self)
src/colors.rs:89
Methodgenerate_hex
Converts the RGBA tuple of the color into a hex code string hex is all upper case and starts with 'x'. example view: `x2F3FB6` # Arguments color - RG
src/colors.rs:34
Methodgrayscale
(img: &DynamicImage)
src/filters.rs:4
Methodhash
(&self, state: &mut H)
src/colors.rs:77
Methodinvert_colors
(img: &DynamicImage)
src/filters.rs:8
Functionmain
()
src/main.rs:21
Methodnew
Constructor for the Palette which holds `n` number of color boxes # Arguments side_length - size of each side of the box n_boxes - number of color bo
src/picture.rs:26
Methodnew
(w: TW, h: TH)
src/utils.rs:123
Methodnew
Constructor which generates hex code of the color from RGBA and sets count to 1
src/colors.rs:17
Methodpartial_cmp
(&self, other: &Self)
src/colors.rs:95
Functiontest_color_construct
()
tests/colors_test.rs:7
Functiontest_color_count_increment
()
tests/colors_test.rs:14
Functiontest_color_generate_hex
()
tests/colors_test.rs:24
Functiontest_color_measure_diff
()
tests/colors_test.rs:31
Functiontest_compute_palette_size
()
tests/picture_test.rs:12
Functiontest_create_palette
()
tests/picture_test.rs:27
Functiontest_framedpic_constructor
()
tests/picture_test.rs:6
Functiontest_get_colors_from
()
tests/utils_test.rs:28
Functiontest_get_dimensions
()
tests/picture_test.rs:19
Functiontest_get_most_freq
()
tests/utils_test.rs:9
Functiontest_palette_rotation
()
tests/picture_test.rs:34