Minor change to SLAPrinter interface
This commit is contained in:
parent
830d89576c
commit
9486901b93
@ -126,9 +126,9 @@ uqptr<sla::RasterBase> SL1Archive::create_raster() const
|
||||
return sla::create_raster_grayscale_aa(res, pxdim, gamma, tr);
|
||||
}
|
||||
|
||||
sla::EncodedRaster SL1Archive::encode_raster(const sla::RasterBase &rst) const
|
||||
sla::RasterEncoder SL1Archive::get_encoder() const
|
||||
{
|
||||
return rst.encode(sla::PNGRasterEncoder());
|
||||
return sla::PNGRasterEncoder{};
|
||||
}
|
||||
|
||||
void SL1Archive::export_print(Zipper& zipper,
|
||||
|
@ -13,7 +13,7 @@ class SL1Archive: public SLAPrinter {
|
||||
|
||||
protected:
|
||||
uqptr<sla::RasterBase> create_raster() const override;
|
||||
sla::EncodedRaster encode_raster(const sla::RasterBase &rst) const override;
|
||||
sla::RasterEncoder get_encoder() const override;
|
||||
|
||||
public:
|
||||
|
||||
|
@ -374,7 +374,7 @@ protected:
|
||||
std::vector<sla::EncodedRaster> m_layers;
|
||||
|
||||
virtual uqptr<sla::RasterBase> create_raster() const = 0;
|
||||
virtual sla::EncodedRaster encode_raster(const sla::RasterBase &rst) const = 0;
|
||||
virtual sla::RasterEncoder get_encoder() const = 0;
|
||||
|
||||
public:
|
||||
virtual ~SLAPrinter() = default;
|
||||
@ -389,7 +389,7 @@ public:
|
||||
[this, &drawfn](sla::EncodedRaster& enc, size_t idx) {
|
||||
auto rst = create_raster();
|
||||
drawfn(*rst, idx);
|
||||
enc = encode_raster(*rst);
|
||||
enc = rst->encode(get_encoder());
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user