summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_renderstatus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/render/cpdf_renderstatus.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 28c7166013..17576fc1f3 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -145,12 +145,14 @@ void DrawAxialShading(CFX_DIBitmap* pBitmap,
for (const auto& func : funcs) {
if (func) {
int nresults = 0;
- if (func->Call(&input, 1, pResults + offset, nresults))
+ if (func->Call(&input, 1, pResults + offset, &nresults))
offset += nresults;
}
}
- float R = 0.0f, G = 0.0f, B = 0.0f;
- pCS->GetRGB(pResults, R, G, B);
+ float R = 0.0f;
+ float G = 0.0f;
+ float B = 0.0f;
+ pCS->GetRGB(pResults, &R, &G, &B);
rgb_array[i] =
FXARGB_TODIB(FXARGB_MAKE(alpha, FXSYS_round(R * 255),
FXSYS_round(G * 255), FXSYS_round(B * 255)));
@@ -226,12 +228,14 @@ void DrawRadialShading(CFX_DIBitmap* pBitmap,
for (const auto& func : funcs) {
if (func) {
int nresults;
- if (func->Call(&input, 1, pResults + offset, nresults))
+ if (func->Call(&input, 1, pResults + offset, &nresults))
offset += nresults;
}
}
- float R = 0.0f, G = 0.0f, B = 0.0f;
- pCS->GetRGB(pResults, R, G, B);
+ float R = 0.0f;
+ float G = 0.0f;
+ float B = 0.0f;
+ pCS->GetRGB(pResults, &R, &G, &B);
rgb_array[i] =
FXARGB_TODIB(FXARGB_MAKE(alpha, FXSYS_round(R * 255),
FXSYS_round(G * 255), FXSYS_round(B * 255)));
@@ -355,7 +359,7 @@ void DrawFuncShading(CFX_DIBitmap* pBitmap,
for (const auto& func : funcs) {
if (func) {
int nresults;
- if (func->Call(input, 2, pResults + offset, nresults))
+ if (func->Call(input, 2, pResults + offset, &nresults))
offset += nresults;
}
}
@@ -363,7 +367,7 @@ void DrawFuncShading(CFX_DIBitmap* pBitmap,
float R = 0.0f;
float G = 0.0f;
float B = 0.0f;
- pCS->GetRGB(pResults, R, G, B);
+ pCS->GetRGB(pResults, &R, &G, &B);
dib_buf[column] = FXARGB_TODIB(FXARGB_MAKE(
alpha, (int32_t)(R * 255), (int32_t)(G * 255), (int32_t)(B * 255)));
}
@@ -2041,8 +2045,10 @@ void CPDF_RenderStatus::DrawShading(CPDF_ShadingPattern* pPattern,
CFX_FixedBufGrow<float, 16> comps(pColorSpace->CountComponents());
for (uint32_t i = 0; i < pColorSpace->CountComponents(); i++)
comps[i] = pBackColor->GetNumberAt(i);
- float R = 0.0f, G = 0.0f, B = 0.0f;
- pColorSpace->GetRGB(comps, R, G, B);
+ float R = 0.0f;
+ float G = 0.0f;
+ float B = 0.0f;
+ pColorSpace->GetRGB(comps, &R, &G, &B);
background = ArgbEncode(255, (int32_t)(R * 255), (int32_t)(G * 255),
(int32_t)(B * 255));
}
@@ -2585,7 +2591,7 @@ std::unique_ptr<CFX_DIBitmap> CPDF_RenderStatus::LoadSMask(
for (size_t i = 0; i < count; i++) {
pFloats[i] = pBC->GetNumberAt(i);
}
- pCS->GetRGB(pFloats, R, G, B);
+ pCS->GetRGB(pFloats, &R, &G, &B);
back_color = 0xff000000 | ((int32_t)(R * 255) << 16) |
((int32_t)(G * 255) << 8) | (int32_t)(B * 255);
m_pContext->GetDocument()->GetPageData()->ReleaseColorSpace(pCSObj);
@@ -2621,7 +2627,7 @@ std::unique_ptr<CFX_DIBitmap> CPDF_RenderStatus::LoadSMask(
for (int i = 0; i < 256; i++) {
float input = (float)i / 255.0f;
int nresult;
- pFunc->Call(&input, 1, results, nresult);
+ pFunc->Call(&input, 1, results, &nresult);
transfers[i] = FXSYS_round(results[0] * 255);
}
} else {