diff options
Diffstat (limited to 'core/fxge')
-rw-r--r-- | core/fxge/dib/cfx_imagetransformer.cpp | 12 | ||||
-rw-r--r-- | core/fxge/dib/cfx_imagetransformer.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/core/fxge/dib/cfx_imagetransformer.cpp b/core/fxge/dib/cfx_imagetransformer.cpp index 37f56b57dc..c41ac2bdf2 100644 --- a/core/fxge/dib/cfx_imagetransformer.cpp +++ b/core/fxge/dib/cfx_imagetransformer.cpp @@ -480,7 +480,7 @@ void CFX_ImageTransformer::DoBilinearLoop( std::function<void(const BilinearData&, uint8_t*)> func) { CFX_BilinearMatrix matrix_fix(cdata.matrix); for (int row = 0; row < m_result.Height(); row++) { - const uint8_t* dest = cdata.bitmap->GetScanline(row); + uint8_t* dest = cdata.bitmap->GetWritableScanline(row); for (int col = 0; col < m_result.Width(); col++) { BilinearData d; d.res_x = 0; @@ -496,7 +496,7 @@ void CFX_ImageTransformer::DoBilinearLoop( AdjustCoords(&d.src_col_r, &d.src_row_r); d.row_offset_l = d.src_row_l * cdata.pitch; d.row_offset_r = d.src_row_r * cdata.pitch; - func(d, const_cast<uint8_t*>(dest)); + func(d, dest); } dest += increment; } @@ -509,7 +509,7 @@ void CFX_ImageTransformer::DoBicubicLoop( std::function<void(const BicubicData&, uint8_t*)> func) { CFX_BilinearMatrix matrix_fix(cdata.matrix); for (int row = 0; row < m_result.Height(); row++) { - const uint8_t* dest = cdata.bitmap->GetScanline(row); + uint8_t* dest = cdata.bitmap->GetWritableScanline(row); for (int col = 0; col < m_result.Width(); col++) { BicubicData d; d.res_x = 0; @@ -523,7 +523,7 @@ void CFX_ImageTransformer::DoBicubicLoop( bicubic_get_pos_weight(d.pos_pixel, d.u_w, d.v_w, d.src_col_l, d.src_row_l, d.res_x, d.res_y, stretch_width(), stretch_height()); - func(d, const_cast<uint8_t*>(dest)); + func(d, dest); } dest += increment; } @@ -536,7 +536,7 @@ void CFX_ImageTransformer::DoDownSampleLoop( std::function<void(const DownSampleData&, uint8_t*)> func) { CPDF_FixedMatrix matrix_fix(cdata.matrix); for (int row = 0; row < m_result.Height(); row++) { - const uint8_t* dest = cdata.bitmap->GetScanline(row); + uint8_t* dest = cdata.bitmap->GetWritableScanline(row); for (int col = 0; col < m_result.Width(); col++) { DownSampleData d; d.src_col = 0; @@ -544,7 +544,7 @@ void CFX_ImageTransformer::DoDownSampleLoop( matrix_fix.Transform(col, row, &d.src_col, &d.src_row); if (LIKELY(InStretchBounds(d.src_col, d.src_row))) { AdjustCoords(&d.src_col, &d.src_row); - func(d, const_cast<uint8_t*>(dest)); + func(d, dest); } dest += increment; } diff --git a/core/fxge/dib/cfx_imagetransformer.h b/core/fxge/dib/cfx_imagetransformer.h index 97dd61f9e1..a5b8841611 100644 --- a/core/fxge/dib/cfx_imagetransformer.h +++ b/core/fxge/dib/cfx_imagetransformer.h @@ -61,7 +61,7 @@ class CFX_ImageTransformer { }; struct CalcData { - const CFX_DIBitmap* bitmap; + CFX_DIBitmap* bitmap; const CFX_Matrix& matrix; const uint8_t* buf; uint32_t pitch; |