comparison Framework/Scene2D/Internals/CairoInfoPanelRenderer.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 9e51fb773bbd
children 6e79e8c9021c
comparison
equal deleted inserted replaced
871:4bc8d9609447 888:6e888cf6a48b
35 anchor_ = l.GetAnchor(); 35 anchor_ = l.GetAnchor();
36 isLinearInterpolation_ = l.IsLinearInterpolation(); 36 isLinearInterpolation_ = l.IsLinearInterpolation();
37 } 37 }
38 38
39 39
40 void CairoInfoPanelRenderer::Render(const AffineTransform2D& transform) 40 void CairoInfoPanelRenderer::Render(const AffineTransform2D& transform,
41 unsigned int canvasWidth,
42 unsigned int canvasHeight)
41 { 43 {
42 int dx, dy; 44 int dx, dy;
43 InfoPanelSceneLayer::ComputeAnchorLocation( 45 InfoPanelSceneLayer::ComputeAnchorLocation(
44 dx, dy, anchor_, texture_.GetWidth(), texture_.GetHeight(), 46 dx, dy, anchor_, texture_.GetWidth(), texture_.GetHeight(),
45 target_.GetCairoWidth(), target_.GetCairoHeight()); 47 canvasWidth, canvasHeight);
46 48
47 cairo_t* cr = target_.GetCairoContext(); 49 cairo_t* cr = target_.GetCairoContext();
48 50
49 cairo_save(cr); 51 cairo_save(cr);
50 52