spritesheet editor fix, zoom levels
This commit is contained in:
1 parent
d079295803
commit
6d206045c7
16 files changed
+345
-336
No files matched your search
+8
-2
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <glad/glad.h>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
@@ -23,7 +25,10 @@ namespace anm2ed
|
||||
static constexpr auto DASH_OFFSET = 1.0f;
|
||||
static constexpr auto STEP = 1.0f;
|
||||
static constexpr auto STEP_FAST = 5.0f;
|
||||
static constexpr auto ZOOM_STEP_FAST_MULTIPLIER = 5.0f;
|
||||
static constexpr auto ZOOM_LEVEL_STEP = 1;
|
||||
static constexpr std::array ZOOM_LEVELS = {1.0f, 2.0f, 5.0f, 10.0f, 15.0f, 25.0f, 33.0f,
|
||||
50.0f, 66.0f, 75.0f, 100.0f, 125.0f, 150.0f, 200.0f,
|
||||
300.0f, 400.0f, 600.0f, 800.0f, 1200.0f, 2000.0f};
|
||||
static constexpr auto GRID_SIZE_MIN = 1;
|
||||
static constexpr auto GRID_SIZE_MAX = 10000;
|
||||
static constexpr auto GRID_OFFSET_MIN = 0;
|
||||
@@ -61,7 +66,8 @@ namespace anm2ed
|
||||
glm::vec4 = glm::vec4(1.0f)) const;
|
||||
void rect_render(resource::Shader&, const glm::mat4&, const glm::mat4&, glm::vec4 = glm::vec4(1.0f),
|
||||
float dashLength = DASH_LENGTH, float dashGap = DASH_GAP, float dashOffset = DASH_OFFSET) const;
|
||||
void zoom_set(float&, glm::vec2&, glm::vec2, float) const;
|
||||
float zoom_level_get(float, int) const;
|
||||
void zoom_level_adjust(float&, glm::vec2&, glm::vec2, int) const;
|
||||
glm::vec2 position_translate(float&, glm::vec2&, glm::vec2) const;
|
||||
void set_to_rect(float& zoom, glm::vec2& pan, glm::vec4 rect) const;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user