Mercurial > hg > orthanc-stone
comparison Framework/Scene2D/Internals/CairoFloatTextureRenderer.cpp @ 772:cfb4d39065a4 am-dev
fix windowing + save windowing
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Fri, 24 May 2019 11:05:06 +0200 |
parents | 9e51fb773bbd |
children | 238693c3bc51 |
comparison
equal
deleted
inserted
replaced
730:fe938bddb932 | 772:cfb4d39065a4 |
---|---|
35 isLinearInterpolation_ = l.IsLinearInterpolation(); | 35 isLinearInterpolation_ = l.IsLinearInterpolation(); |
36 | 36 |
37 float windowCenter, windowWidth; | 37 float windowCenter, windowWidth; |
38 l.GetWindowing(windowCenter, windowWidth); | 38 l.GetWindowing(windowCenter, windowWidth); |
39 | 39 |
40 const float a = windowCenter - windowWidth; | 40 const float a = windowCenter - windowWidth / 2.0f; |
41 const float slope = 256.0f / (2.0f * windowWidth); | 41 const float slope = 256.0f / windowWidth; |
42 | 42 |
43 const Orthanc::ImageAccessor& source = l.GetTexture(); | 43 const Orthanc::ImageAccessor& source = l.GetTexture(); |
44 const unsigned int width = source.GetWidth(); | 44 const unsigned int width = source.GetWidth(); |
45 const unsigned int height = source.GetHeight(); | 45 const unsigned int height = source.GetHeight(); |
46 texture_.SetSize(width, height, false); | 46 texture_.SetSize(width, height, false); |