git-svn-id: svn://db.shs.com.ru/libs@655 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-12-06 10:13:41 +00:00
parent d5eaa289b2
commit edfe165f90
3 changed files with 10 additions and 6 deletions

View File

@@ -31,6 +31,7 @@ RendererSelection::RendererSelection(Renderer * r_): r(r_),
sel_frame = Primitive::plane(2., 2.);
id_hover = 0;
line_thick_ = 2.;
scale_ = 0.5;
}
@@ -46,7 +47,7 @@ void RendererSelection::init(int width, int height) {
void RendererSelection::resize(int width, int height) {
fbo_selection.enablePixelBuffer();
fbo_selection.resize(width, height);
fbo_selection.resize(width*scale_, height*scale_);
line_thick_ = lineThickness() + 1.;
}
@@ -126,9 +127,10 @@ void RendererSelection::renderSelection(Scene & scene) {
//mouse_rect = fbo_selection.rect();
if (r->mouse_rect.isNull())
fbo_selection.queryPoint(0, r->mouse_pos);
fbo_selection.queryPoint(0, r->mouse_pos * scale_);
else
fbo_selection.queryPoints(0, r->mouse_rect);
fbo_selection.queryPoints(0, QRect(r->mouse_rect.topLeft() * scale_,
r->mouse_rect.size() * scale_));
//qDebug() << id_hover;
fbo_selection.bindColorTexture(sbrSrcHover , sbrSrcHover );