render-sdf.h 722 B

12345678910111213141516171819
  1. #pragma once
  2. #include "Vector2.h"
  3. #include "Bitmap.h"
  4. namespace msdfgen {
  5. /// Reconstructs the shape's appearance into output from the distance field sdf.
  6. void renderSDF(Bitmap<float> &output, const Bitmap<float> &sdf, double pxRange = 0);
  7. void renderSDF(Bitmap<FloatRGB> &output, const Bitmap<float> &sdf, double pxRange = 0);
  8. void renderSDF(Bitmap<float> &output, const Bitmap<FloatRGB> &sdf, double pxRange = 0);
  9. void renderSDF(Bitmap<FloatRGB> &output, const Bitmap<FloatRGB> &sdf, double pxRange = 0);
  10. /// Snaps the values of the floating-point bitmaps into one of the 256 values representable in a standard 8-bit bitmap.
  11. void simulate8bit(Bitmap<float> &bitmap);
  12. void simulate8bit(Bitmap<FloatRGB> &bitmap);
  13. }