1#ifndef TYPESET_BACKEND_RASTER_HPP
2#define TYPESET_BACKEND_RASTER_HPP
25 std::vector<uint32_t>
argb;
27 uint32_t*
row(
int y) {
return argb.data() +
static_cast<size_t>(y) *
width; }
28 const uint32_t*
row(
int y)
const {
return argb.data() +
static_cast<size_t>(y) *
width; }
64 uint32_t* pixels,
int width,
int height,
int stridePixels,
65 const Matrix& toDevice,
bool useCache =
true, uint8_t alphaThreshold = 0);
72 std::unique_ptr<Impl> impl_;
void render(const dl::DisplayList &list, uint32_t *pixels, int width, int height, int stridePixels, const Matrix &toDevice, bool useCache=true, uint8_t alphaThreshold=0)
既存バッファへ描く(組み込み用)
RasterRenderer(const RasterRenderer &)=delete
RasterRenderer & operator=(const RasterRenderer &)=delete
void setCacheMaxBytes(size_t bytes)
Bitmap render(const dl::DisplayList &list, const RasterOptions &opts={})
ページ全体を描いた Bitmap を返す
backend/pdf_writer — 表示リストを PDF へ
bool savePng(const Bitmap &bitmap, const std::string &path)
PNG 書き出し(ラスタ backend の確認用。zlib で圧縮)
2x3 アフィン行列(行優先) x' = xx*x + xy*y + dx y' = yx*x + yy*y + dy
const uint32_t * row(int y) const
std::vector< uint32_t > argb
uint8_t alphaThreshold
2 値化の閾値(0〜255。カバレッジがこれ以上なら塗る)
bool antialias
アンチエイリアス。false でカバレッジを閾値で 2 値化して描く(小サイズのゲーム用途。にじみが出ない)。 グリッドフィット(ヒンティング)は glyphware のマスク API が持たないので効...