mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-07-27 11:54:41 +03:00
Rasterizer skeleton
This commit is contained in:
43
xs/src/libslic3r/Rasterizer/Rasterizer.hpp
Normal file
43
xs/src/libslic3r/Rasterizer/Rasterizer.hpp
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef RASTERIZER_HPP
|
||||
#define RASTERIZER_HPP
|
||||
|
||||
#include <Polygon.hpp>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class Raster {
|
||||
class Impl;
|
||||
std::unique_ptr<Impl> impl_;
|
||||
public:
|
||||
|
||||
struct Resolution {
|
||||
unsigned width_px;
|
||||
unsigned height_px;
|
||||
inline Resolution(unsigned w, unsigned h): width_px(w), height_px(h) {}
|
||||
};
|
||||
|
||||
struct PixelDim {
|
||||
double w_mm;
|
||||
double h_mm;
|
||||
inline PixelDim(double px_width_mm, double px_height_mm ):
|
||||
w_mm(px_width_mm), h_mm(px_height_mm) {}
|
||||
};
|
||||
|
||||
inline explicit Raster(const Resolution& r, const PixelDim& pd );
|
||||
~Raster();
|
||||
Raster(const Raster& cpy);
|
||||
Raster(Raster&& m);
|
||||
|
||||
void clear();
|
||||
|
||||
void draw(const Polygon& poly);
|
||||
|
||||
void finish();
|
||||
|
||||
private:
|
||||
Resolution resolution_;
|
||||
PixelDim pxdim_;
|
||||
};
|
||||
|
||||
}
|
||||
#endif // RASTERIZER_HPP
|
||||
Reference in New Issue
Block a user