Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Scene2D/Internals/CairoTextRenderer.cpp @ 1625:4a2c63ae8f99
minor optimization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Nov 2020 17:36:35 +0100 |
parents | 8563ea5d8ae4 |
children | 9ac2a65d4172 |
comparison
equal
deleted
inserted
replaced
1624:59f95b9ea858 | 1625:4a2c63ae8f99 |
---|---|
46 accessor.GetFormat() != Orthanc::PixelFormat_BGRA32) | 46 accessor.GetFormat() != Orthanc::PixelFormat_BGRA32) |
47 { | 47 { |
48 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); | 48 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); |
49 } | 49 } |
50 | 50 |
51 const unsigned int height = source->GetHeight(); | |
51 const unsigned int width = source->GetWidth(); | 52 const unsigned int width = source->GetWidth(); |
52 const Color& color = layer.GetColor(); | 53 const Color& color = layer.GetColor(); |
53 | 54 |
54 for (unsigned int y = 0; y < source->GetHeight(); y++) | 55 for (unsigned int y = 0; y < height; y++) |
55 { | 56 { |
56 const uint8_t* p = reinterpret_cast<const uint8_t*>(source->GetConstRow(y)); | 57 const uint8_t* p = reinterpret_cast<const uint8_t*>(source->GetConstRow(y)); |
57 uint8_t* q = reinterpret_cast<uint8_t*>(accessor.GetRow(y)); | 58 uint8_t* q = reinterpret_cast<uint8_t*>(accessor.GetRow(y)); |
58 | 59 |
59 for (unsigned int x = 0; x < width; x++) | 60 for (unsigned int x = 0; x < width; x++) |