![]() |
Geometrize 1.0
C++ library for geometrizing images into geometric primitives
|
Classes | |
struct | SVGExportOptions |
The SVGExportOptions struct represents the options that can be set for the SVG export. More... | |
Enumerations | |
enum class | RotatedEllipseSVGExportMode { ELLIPSE_ITEM = 0 , POLYGON = 1 } |
Functions | |
void | writeToStream (std::ostringstream &stream, const std::uint8_t &t) |
std::string | exportBitmapData (const geometrize::Bitmap &bitmapData) |
exportBitmapData Exports the raw image data to a binary dump - just the data as RGBA8888, no zero-padding or anything. More... | |
std::uint16_t | flip16 (const std::uint16_t &v) |
std::uint32_t | flip32 (const std::uint32_t &v) |
bool | bigEndian () |
void | writeToStream (std::ostringstream &stream, const std::uint32_t &t) |
void | writeToStream (std::ostringstream &stream, const std::uint16_t &t) |
std::string | exportBMP (const geometrize::Bitmap &bitmapData) |
exportBMP Exports the image data to a RGB888 bitmap image file (BMP). More... | |
std::string | exportShapeArray (const std::vector< geometrize::ShapeResult > &data) |
exportShapeArray Exports shape data to a compact array-style format. Data is three lines per shape, each line: shapeEnumTypeId shapeData R,G,B,A More... | |
std::string | exportShapeJson (const std::vector< geometrize::ShapeResult > &data) |
exportShapeJson Exports shape data to JSON. More... | |
std::string | getSingleShapeSVGData (const geometrize::rgba &color, const geometrize::Shape &shape, SVGExportOptions options=SVGExportOptions{}) |
getSvgShapeData Gets the SVG data for a single shape. This is just the <rect>/<path> etc block for the shape itself, not a complete SVG image. More... | |
std::string | exportSingleShapeSVG (const geometrize::rgba &color, const geometrize::Shape &shape, const std::uint32_t width, const std::uint32_t height, SVGExportOptions options=SVGExportOptions{}) |
exportSVG Exports a single shape as a complete SVG image. More... | |
std::string | exportSVG (const std::vector< geometrize::ShapeResult > &data, const std::uint32_t width, const std::uint32_t height, SVGExportOptions options=SVGExportOptions{}) |
exportSVG Exports shape data as a complete SVG image. More... | |
Variables | |
static const std::string | SVG_STYLE_HOOK = "::svg_style_hook::" |
SVG_STYLE_HOOK A hook that an SVG exporter should use to augment shape styling produced by the getSvgShapeData method. More... | |
|
strong |
Enumerator | |
---|---|
ELLIPSE_ITEM | |
POLYGON |
|
inline |
std::string geometrize::exporter::exportBitmapData | ( | const geometrize::Bitmap & | bitmapData | ) |
exportBitmapData Exports the raw image data to a binary dump - just the data as RGBA8888, no zero-padding or anything.
bitmapData | The image data to save as binary data. |
std::string geometrize::exporter::exportBMP | ( | const geometrize::Bitmap & | bitmapData | ) |
exportBMP Exports the image data to a RGB888 bitmap image file (BMP).
bitmapData | The image data to save as a bitmap image file. |
std::string geometrize::exporter::exportShapeArray | ( | const std::vector< geometrize::ShapeResult > & | data | ) |
exportShapeArray Exports shape data to a compact array-style format. Data is three lines per shape, each line: shapeEnumTypeId shapeData R,G,B,A
data | The shape data to export. |
std::string geometrize::exporter::exportShapeJson | ( | const std::vector< geometrize::ShapeResult > & | data | ) |
exportShapeJson Exports shape data to JSON.
data | The shape data to export. |
std::string geometrize::exporter::exportSingleShapeSVG | ( | const geometrize::rgba & | color, |
const geometrize::Shape & | shape, | ||
const std::uint32_t | width, | ||
const std::uint32_t | height, | ||
SVGExportOptions | options = SVGExportOptions{} |
||
) |
exportSVG Exports a single shape as a complete SVG image.
color | The color of the shape to export. |
shape | The shape to export. |
width | The width of the SVG image. |
height | The height of the SVG image. |
options | additional options used by the exporter. |
std::string geometrize::exporter::exportSVG | ( | const std::vector< geometrize::ShapeResult > & | data, |
const std::uint32_t | width, | ||
const std::uint32_t | height, | ||
SVGExportOptions | options = SVGExportOptions{} |
||
) |
exportSVG Exports shape data as a complete SVG image.
data | The shape data to export. |
width | The width of the SVG image. |
height | The height of the SVG image. |
options | additional options used by the exporter. |
|
inline |
|
inline |
std::string geometrize::exporter::getSingleShapeSVGData | ( | const geometrize::rgba & | color, |
const geometrize::Shape & | shape, | ||
SVGExportOptions | options = SVGExportOptions{} |
||
) |
getSvgShapeData Gets the SVG data for a single shape. This is just the <rect>/<path> etc block for the shape itself, not a complete SVG image.
color | The color of the shape. |
shape | The shape to convert to SVG data. |
options | additional options used by the exporter. |
|
inline |
|
inline |
|
inline |
|
static |
SVG_STYLE_HOOK A hook that an SVG exporter should use to augment shape styling produced by the getSvgShapeData method.