| 1 |
|
| 2 |
#pragma once |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#include "core/base.h" |
| 19 |
#include "core/arithmetics.hpp" |
| 20 |
#include "core/Vector2.hpp" |
| 21 |
#include "core/Range.hpp" |
| 22 |
#include "core/Projection.h" |
| 23 |
#include "core/DistanceMapping.h" |
| 24 |
#include "core/SDFTransformation.h" |
| 25 |
#include "core/Scanline.h" |
| 26 |
#include "core/Shape.h" |
| 27 |
#include "core/BitmapRef.hpp" |
| 28 |
#include "core/Bitmap.h" |
| 29 |
#include "core/bitmap-interpolation.hpp" |
| 30 |
#include "core/pixel-conversion.hpp" |
| 31 |
#include "core/edge-coloring.h" |
| 32 |
#include "core/generator-config.h" |
| 33 |
#include "core/msdf-error-correction.h" |
| 34 |
#include "core/render-sdf.h" |
| 35 |
#include "core/rasterization.h" |
| 36 |
#include "core/sdf-error-estimation.h" |
| 37 |
#include "core/shape-description.h" |
| 38 |
|
| 39 |
namespace msdfgen { |
| 40 |
|
| 41 |
|
| 42 |
void generateSDF(const BitmapSection<float, 1> &output, const Shape &shape, const SDFTransformation &transformation, const GeneratorConfig &config = GeneratorConfig()); |
| 43 |
|
| 44 |
|
| 45 |
void generatePSDF(const BitmapSection<float, 1> &output, const Shape &shape, const SDFTransformation &transformation, const GeneratorConfig &config = GeneratorConfig()); |
| 46 |
|
| 47 |
|
| 48 |
void generateMSDF(const BitmapSection<float, 3> &output, const Shape &shape, const SDFTransformation &transformation, const MSDFGeneratorConfig &config = MSDFGeneratorConfig()); |
| 49 |
|
| 50 |
|
| 51 |
void generateMTSDF(const BitmapSection<float, 4> &output, const Shape &shape, const SDFTransformation &transformation, const MSDFGeneratorConfig &config = MSDFGeneratorConfig()); |
| 52 |
|
| 53 |
|
| 54 |
void generateSDF(const BitmapSection<float, 1> &output, const Shape &shape, const Projection &projection, Range range, const GeneratorConfig &config = GeneratorConfig()); |
| 55 |
void generatePSDF(const BitmapSection<float, 1> &output, const Shape &shape, const Projection &projection, Range range, const GeneratorConfig &config = GeneratorConfig()); |
| 56 |
void generatePseudoSDF(const BitmapSection<float, 1> &output, const Shape &shape, const Projection &projection, Range range, const GeneratorConfig &config = GeneratorConfig()); |
| 57 |
void generateMSDF(const BitmapSection<float, 3> &output, const Shape &shape, const Projection &projection, Range range, const MSDFGeneratorConfig &config = MSDFGeneratorConfig()); |
| 58 |
void generateMTSDF(const BitmapSection<float, 4> &output, const Shape &shape, const Projection &projection, Range range, const MSDFGeneratorConfig &config = MSDFGeneratorConfig()); |
| 59 |
|
| 60 |
void generateSDF(const BitmapSection<float, 1> &output, const Shape &shape, Range range, const Vector2 &scale, const Vector2 &translate, bool overlapSupport = true); |
| 61 |
void generatePSDF(const BitmapSection<float, 1> &output, const Shape &shape, Range range, const Vector2 &scale, const Vector2 &translate, bool overlapSupport = true); |
| 62 |
void generatePseudoSDF(const BitmapSection<float, 1> &output, const Shape &shape, Range range, const Vector2 &scale, const Vector2 &translate, bool overlapSupport = true); |
| 63 |
void generateMSDF(const BitmapSection<float, 3> &output, const Shape &shape, Range range, const Vector2 &scale, const Vector2 &translate, const ErrorCorrectionConfig &errorCorrectionConfig = ErrorCorrectionConfig(), bool overlapSupport = true); |
| 64 |
void generateMTSDF(const BitmapSection<float, 4> &output, const Shape &shape, Range range, const Vector2 &scale, const Vector2 &translate, const ErrorCorrectionConfig &errorCorrectionConfig = ErrorCorrectionConfig(), bool overlapSupport = true); |
| 65 |
|
| 66 |
|
| 67 |
void generateSDF_legacy(BitmapSection<float, 1> output, const Shape &shape, Range range, const Vector2 &scale, const Vector2 &translate); |
| 68 |
void generatePSDF_legacy(BitmapSection<float, 1> output, const Shape &shape, Range range, const Vector2 &scale, const Vector2 &translate); |
| 69 |
void generatePseudoSDF_legacy(BitmapSection<float, 1> output, const Shape &shape, Range range, const Vector2 &scale, const Vector2 &translate); |
| 70 |
void generateMSDF_legacy(BitmapSection<float, 3> output, const Shape &shape, Range range, const Vector2 &scale, const Vector2 &translate, ErrorCorrectionConfig errorCorrectionConfig = ErrorCorrectionConfig()); |
| 71 |
void generateMTSDF_legacy(BitmapSection<float, 4> output, const Shape &shape, Range range, const Vector2 &scale, const Vector2 &translate, ErrorCorrectionConfig errorCorrectionConfig = ErrorCorrectionConfig()); |
| 72 |
|
| 73 |
} |