mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-04 01:20:40 +08:00
42 lines
950 B
C++
42 lines
950 B
C++
///|/ Copyright (c) Prusa Research 2019 - 2021 Vojtěch Bubník @bubnikv, Lukáš Matěna @lukasmatena, Enrico Turri @enricoturri1966
|
|
///|/
|
|
///|/ PrusaSlicer is released under the terms of the AGPLv3 or higher
|
|
///|/
|
|
#ifndef slic3r_ThumbnailData_hpp_
|
|
#define slic3r_ThumbnailData_hpp_
|
|
|
|
#include <vector>
|
|
#include "libslic3r/Point.hpp"
|
|
|
|
namespace Slic3r {
|
|
|
|
struct ThumbnailData
|
|
{
|
|
unsigned int width;
|
|
unsigned int height;
|
|
std::vector<unsigned char> pixels;
|
|
|
|
ThumbnailData() { reset(); }
|
|
void set(unsigned int w, unsigned int h);
|
|
void reset();
|
|
|
|
bool is_valid() const;
|
|
};
|
|
|
|
using ThumbnailsList = std::vector<ThumbnailData>;
|
|
|
|
struct ThumbnailsParams
|
|
{
|
|
const Vec2ds sizes;
|
|
bool printable_only;
|
|
bool parts_only;
|
|
bool show_bed;
|
|
bool transparent_background;
|
|
};
|
|
|
|
typedef std::function<ThumbnailsList(const ThumbnailsParams&)> ThumbnailsGeneratorCallback;
|
|
|
|
} // namespace Slic3r
|
|
|
|
#endif // slic3r_ThumbnailData_hpp_
|