1
2#pragma once
3
4#include "Vector2.h"
5#include "BitmapRef.hpp"
6
7namespace msdfgen {
8
9/// Reconstructs the shape's appearance into output from the distance field sdf.
10void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 1> &sdf, double pxRange = 0, float midValue = .5f);
11void renderSDF(const BitmapRef<float, 3> &output, const BitmapConstRef<float, 1> &sdf, double pxRange = 0, float midValue = .5f);
12void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 3> &sdf, double pxRange = 0, float midValue = .5f);
13void renderSDF(const BitmapRef<float, 3> &output, const BitmapConstRef<float, 3> &sdf, double pxRange = 0, float midValue = .5f);
14void renderSDF(const BitmapRef<float, 1> &output, const BitmapConstRef<float, 4> &sdf, double pxRange = 0, float midValue = .5f);
15void renderSDF(const BitmapRef<float, 4> &output, const BitmapConstRef<float, 4> &sdf, double pxRange = 0, float midValue = .5f);
16
17/// Snaps the values of the floating-point bitmaps into one of the 256 values representable in a standard 8-bit bitmap.
18void simulate8bit(const BitmapRef<float, 1> &bitmap);
19void simulate8bit(const BitmapRef<float, 3> &bitmap);
20void simulate8bit(const BitmapRef<float, 4> &bitmap);
21
22}
23