fix spacing on hdpi
This commit is contained in:
@@ -291,7 +291,7 @@ void Stroke::add_point(glm::vec3 pos, float pressure)
|
||||
float aspect_width = glm::min(1.f, glm::clamp(m_brush->m_tip_aspect, .1f, .9f) * 2.f);
|
||||
float raw_size = glm::clamp(m_brush->m_tip_size / glm::tan(glm::radians(m_camera.fov * 0.5f)), 1.f, m_max_size);
|
||||
float size = aspect_width * glm::min(m_brush->m_tip_scale.x, m_brush->m_tip_scale.y) * raw_size;
|
||||
m_step = glm::max(0.5f, m_brush->m_tip_spacing * size);
|
||||
m_step = glm::max(0.5f, m_brush->m_tip_spacing * size * App::I.zoom);
|
||||
}
|
||||
|
||||
float dist = m_keypoints.empty() ? m_step :
|
||||
@@ -324,7 +324,7 @@ void Stroke::start(const std::shared_ptr<Brush>& brush)
|
||||
float aspect_width = glm::min(1.f, glm::clamp(m_brush->m_tip_aspect, .1f, .9f) * 2.f);
|
||||
float raw_size = glm::clamp(m_brush->m_tip_size / glm::tan(glm::radians(m_camera.fov * 0.5f)), 1.f, m_max_size);
|
||||
float size = aspect_width * glm::min(m_brush->m_tip_scale.x, m_brush->m_tip_scale.y) * raw_size;
|
||||
m_step = glm::max(0.5f, m_brush->m_tip_spacing * size);
|
||||
m_step = glm::max(0.5f, m_brush->m_tip_spacing * size * App::I.zoom);
|
||||
|
||||
auto hsv = convert_rgb2hsv(m_brush->m_tip_color);
|
||||
if (!m_brush->m_jitter_hsv_eachsample)
|
||||
|
||||
Reference in New Issue
Block a user