fix canvas on hdpi
This commit is contained in:
@@ -243,7 +243,7 @@ void CanvasModePen::on_Draw(const glm::mat4& ortho, const glm::mat4& proj, const
|
||||
}
|
||||
}
|
||||
glm::u8vec4 pixel;
|
||||
glReadPixels(pos.x, App::I.height - pos.y - 1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel);
|
||||
glReadPixels(pos.x / App::I.zoom, (App::I.height - pos.y - 1) / App::I.zoom, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &pixel);
|
||||
bool outline = glm::min(tip_scale.x, tip_scale.y) < 20 || m_resizing ? false : m_draw_outline;
|
||||
ShaderManager::u_int(kShaderUniform::DrawOutline, outline);
|
||||
ShaderManager::u_vec4(kShaderUniform::Col, outline ? glm::vec4(1.f - glm::vec3(pixel) / 255.f, 1.f) : tip_color);
|
||||
|
||||
Reference in New Issue
Block a user