v1.0.0-rc.81

This commit is contained in:
2025-09-21 19:27:51 +02:00
parent 3ded4cd3ce
commit 5d9d2de4a4
243 changed files with 3401 additions and 935 deletions
+13 -9
View File
@@ -20,6 +20,7 @@ constexpr const static rgb purple = {.r = 0x7b, .g = 0x1f, .b = 0xA2};
constexpr const static rgb orange = {.r = 0xff, .g = 0x57, .b = 0x22};
constexpr const static rgb amber = {.r =0xff, .g = 0xc1, .b = 0x07};
constexpr const static rgb blue = {.r = 0x0d, .g = 0x47, .b = 0xa1};
constexpr const static rgb cyan = {.r = 0x00, .g = 0xff, .b = 0xff}; // "ice" color
constexpr const static rgb plotly[] = {{0x1f, 0x77, 0xb4},
{0xff, 0x7f, 0x0e},
@@ -39,11 +40,8 @@ void PreviewImage::color_pixel(std::vector<rgb> &ret, int64_t in_xpixel, int64_t
ret[(in_ypixel * xpixel + in_xpixel)] = color;
}
void PreviewImage::spot(std::vector<rgb> &ret, int64_t in_xpixel, int64_t in_ypixel, bool indexed) const {
if (indexed)
color_pixel(ret, in_xpixel, in_ypixel, pink);
else
color_pixel(ret, in_xpixel, in_ypixel, amber);
void PreviewImage::spot(std::vector<rgb> &ret, int64_t in_xpixel, int64_t in_ypixel, const rgb &color) const {
color_pixel(ret, in_xpixel, in_ypixel, color);
}
void PreviewImage::roi(std::vector<rgb> &ret, int64_t in_xpixel, int64_t in_ypixel, int64_t roi_number) const {
@@ -95,12 +93,18 @@ void PreviewImage::AddSpots(std::vector<rgb> &rgb_image,
int rectangle_size = 4;
int rectangle_width = 3;
rgb color = pink;
if (s.indexed)
color = amber;
else if (s.ice_ring)
color = cyan;
for (int z = rectangle_size; z < rectangle_size + rectangle_width; z++) {
for (int w = -z; w <= z; w++) {
spot(rgb_image, spot_x_int + z, spot_y_int + w, s.indexed);
spot(rgb_image, spot_x_int - z, spot_y_int + w, s.indexed);
spot(rgb_image, spot_x_int + w, spot_y_int + z, s.indexed);
spot(rgb_image, spot_x_int + w, spot_y_int - z, s.indexed);
spot(rgb_image, spot_x_int + z, spot_y_int + w, color);
spot(rgb_image, spot_x_int - z, spot_y_int + w, color);
spot(rgb_image, spot_x_int + w, spot_y_int + z, color);
spot(rgb_image, spot_x_int + w, spot_y_int - z, color);
}
}
}