1// Aseprite
2// Copyright (C) 2020-2021 Igara Studio S.A.
3//
4// This program is distributed under the terms of
5// the End-User License Agreement for Aseprite.
6
7#ifndef APP_TOOLS_DYNAMICS_H_INCLUDED
8#define APP_TOOLS_DYNAMICS_H_INCLUDED
9#pragma once
10
11#include "render/dithering_matrix.h"
12
13namespace app {
14namespace tools {
15
16 enum class DynamicSensor {
17 Static,
18 Pressure,
19 Velocity,
20 };
21
22 enum class ColorFromTo {
23 BgToFg,
24 FgToBg,
25 };
26
27 struct DynamicsOptions {
28 int stabilizerFactor = 0;
29 DynamicSensor size = DynamicSensor::Static;
30 DynamicSensor angle = DynamicSensor::Static;
31 DynamicSensor gradient = DynamicSensor::Static;
32 int minSize = 0;
33 int minAngle = 0;
34 render::DitheringMatrix ditheringMatrix;
35 ColorFromTo colorFromTo = ColorFromTo::BgToFg;
36 float minPressureThreshold = 0.0f, maxPressureThreshold = 1.0f;
37 float minVelocityThreshold = 0.0f, maxVelocityThreshold = 1.0f;
38
39 bool isDynamic() const {
40 return (size != DynamicSensor::Static ||
41 angle != DynamicSensor::Static ||
42 gradient != DynamicSensor::Static);
43 }
44 };
45
46} // namespace tools
47} // namespace app
48
49#endif
50