fix mixer on hdpi scale
This commit is contained in:
@@ -444,7 +444,7 @@ std::vector<Canvas::StrokeFrame> Canvas::stroke_draw_compute(Stroke& stroke) con
|
||||
+dx - dy, // D - bottom-right
|
||||
};
|
||||
|
||||
glm::vec2 mixer_sz(m_mixer.getWidth(), m_mixer.getHeight());
|
||||
glm::vec2 mixer_sz(App::I.width, App::I.height);
|
||||
glm::vec2 mixer_bb_min(mixer_sz);
|
||||
glm::vec2 mixer_bb_max(0, 0);
|
||||
for (int j = 0; j < 4; j++)
|
||||
@@ -466,7 +466,7 @@ std::vector<Canvas::StrokeFrame> Canvas::stroke_draw_compute(Stroke& stroke) con
|
||||
B[j].uvs2 = p / mixer_sz;
|
||||
}
|
||||
|
||||
f.m_mixer_rect = { glm::floor(mixer_bb_min), glm::ceil(mixer_bb_max - mixer_bb_min) };
|
||||
f.m_mixer_rect = glm::vec4(glm::floor(mixer_bb_min), glm::ceil(mixer_bb_max - mixer_bb_min)) / App::I.zoom;
|
||||
f.col = glm::vec4(s.col, 1);
|
||||
f.flow = s.flow;
|
||||
f.opacity = s.opacity;
|
||||
|
||||
Reference in New Issue
Block a user