Add paint stroke script automation
This commit is contained in:
28
src/paint/stroke_script.h
Normal file
28
src/paint/stroke_script.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user