Skip to content
Permalink
Browse files

Fix camera border rendering

Due to a rounding issue, the camera border would sometimes
be missing a row/column on the side. This was really noticable
when zoomed in.
  • Loading branch information...
scribblemaniac committed Apr 11, 2019
1 parent 7a41226 commit d3a41d3186ab2f7184cf35750d6b88b6336d1ef8
Showing with 2 additions and 2 deletions.
  1. +2 −2 core_lib/src/canvaspainter.cpp
@@ -458,14 +458,14 @@ void CanvasPainter::paintCameraBorder(QPainter &painter)
{
painter.setWorldMatrixEnabled(false);
QTransform center = QTransform::fromTranslate(viewRect.width() / 2.0, viewRect.height() / 2.0);
boundingRect = viewRect.toRect();
boundingRect = viewRect.toAlignedRect();
mCameraRect = center.mapRect(mCameraRect);
}
else
{
painter.setWorldMatrixEnabled(true);
QTransform viewInverse = mViewTransform.inverted();
boundingRect = viewInverse.mapRect(viewRect).toRect();
boundingRect = viewInverse.mapRect(viewRect).toAlignedRect();

QTransform camTransform = cameraLayer->getViewAtFrame(mFrameNumber);
mCameraRect = camTransform.inverted().mapRect(mCameraRect);

0 comments on commit d3a41d3

Please sign in to comment.
You can’t perform that action at this time.