Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/Internals/OpenGLInfoPanelRenderer.cpp @ 888:6e888cf6a48b
renderers now have access to canvas width/height
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 10 Jul 2019 11:58:38 +0200 |
parents | 9807ed3d3e03 |
children | 1091b2adeb5a |
comparison
equal
deleted
inserted
replaced
871:4bc8d9609447 | 888:6e888cf6a48b |
---|---|
42 { | 42 { |
43 LoadTexture(layer); | 43 LoadTexture(layer); |
44 } | 44 } |
45 | 45 |
46 | 46 |
47 void OpenGLInfoPanelRenderer::Render(const AffineTransform2D& transform) | 47 void OpenGLInfoPanelRenderer::Render(const AffineTransform2D& transform, |
48 unsigned int canvasWidth, | |
49 unsigned int canvasHeight) | |
48 { | 50 { |
49 if (texture_.get() != NULL) | 51 if (texture_.get() != NULL) |
50 { | 52 { |
51 int dx, dy; | 53 int dx, dy; |
52 InfoPanelSceneLayer::ComputeAnchorLocation( | 54 InfoPanelSceneLayer::ComputeAnchorLocation( |
53 dx, dy, anchor_, texture_->GetWidth(), texture_->GetHeight(), | 55 dx, dy, anchor_, texture_->GetWidth(), texture_->GetHeight(), |
54 context_.GetCanvasWidth(), context_.GetCanvasHeight()); | 56 canvasWidth, canvasHeight); |
55 | 57 |
56 // The position of this type of layer is layer: Ignore the | 58 // The position of this type of layer is layer: Ignore the |
57 // "transform" coming from the scene | 59 // "transform" coming from the scene |
58 program_.Apply(*texture_, AffineTransform2D::CreateOffset(dx, dy), true); | 60 program_.Apply(*texture_, AffineTransform2D::CreateOffset(dx, dy), true); |
59 } | 61 } |