29 lines
605 B
C++
29 lines
605 B
C++
#pragma once
|
|
|
|
#include "foundation/result.h"
|
|
#include "paint/stroke.h"
|
|
|
|
#include <cstddef>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
namespace pp::paint {
|
|
|
|
constexpr std::size_t max_stroke_script_bytes = 1024 * 1024;
|
|
constexpr std::size_t max_stroke_script_line_length = 512;
|
|
constexpr std::size_t max_stroke_script_strokes = 10000;
|
|
|
|
struct StrokeScriptStroke {
|
|
StrokePoint start;
|
|
StrokePoint end;
|
|
float spacing = 1.0F;
|
|
};
|
|
|
|
struct StrokeScript {
|
|
std::vector<StrokeScriptStroke> strokes;
|
|
};
|
|
|
|
[[nodiscard]] pp::foundation::Result<StrokeScript> parse_stroke_script(std::string_view text);
|
|
|
|
}
|