mirror of
https://github.com/openharmony/graphic_utils.git
synced 2026-07-19 16:33:31 -04:00
!235 utils遗漏修改回合10月分支
Merge pull request !235 from suwenxiang/cherry-pick-1667369246
This commit is contained in:
@@ -58,7 +58,9 @@ public:
|
||||
if (isGetRGBAIntegral) {
|
||||
GetRGBAIntegralImage((uint8_t*)img.PixValuePtr(0, 0), width, height, stride);
|
||||
}
|
||||
#ifndef __ICCARM__
|
||||
#pragma omp parallel for
|
||||
#endif
|
||||
for (int32_t y = 0; y < height; y++) {
|
||||
int32_t y1 = MATH_MAX(y - radius, 0);
|
||||
int32_t y2 = MATH_MIN(y + radius + 1, height);
|
||||
|
||||
@@ -65,8 +65,8 @@ public:
|
||||
: interpolator_(&inter),
|
||||
gradientFunction_(&GradientFunction),
|
||||
colorFunction_(&ColorFunction),
|
||||
distance1_(distance1 * GRADIENT_SUBPIXEL_SCALE),
|
||||
distance2_(distance2 * GRADIENT_SUBPIXEL_SCALE) {}
|
||||
distance1_(static_cast<int32_t>(distance1 * GRADIENT_SUBPIXEL_SCALE)),
|
||||
distance2_(static_cast<int32_t>(distance2 * GRADIENT_SUBPIXEL_SCALE)) {}
|
||||
|
||||
void Prepare() {}
|
||||
|
||||
@@ -121,9 +121,9 @@ public:
|
||||
* @param dy In the y-axis direction, the distance from the end circle center to the start circle center
|
||||
*/
|
||||
GradientRadialCalculate(float endRadius, float dx, float dy)
|
||||
: endRadius_(endRadius * GRADIENT_SUBPIXEL_SCALE),
|
||||
dx_(dx * GRADIENT_SUBPIXEL_SCALE),
|
||||
dy_(dy * GRADIENT_SUBPIXEL_SCALE)
|
||||
: endRadius_(static_cast<int32_t>(endRadius * GRADIENT_SUBPIXEL_SCALE)),
|
||||
dx_(static_cast<int32_t>(dx * GRADIENT_SUBPIXEL_SCALE)),
|
||||
dy_(static_cast<int32_t>(dy * GRADIENT_SUBPIXEL_SCALE))
|
||||
{
|
||||
UpdateValues();
|
||||
}
|
||||
@@ -149,9 +149,9 @@ public:
|
||||
if (deltaRadius < 1) {
|
||||
deltaRadius = 1;
|
||||
}
|
||||
int16_t index = (((dx * dx_ + dy * dy_ +
|
||||
int16_t index = static_cast<int16_t>((((dx * dx_ + dy * dy_ +
|
||||
Sqrt(fabs(radiusDistance)))
|
||||
* mul_ - startRadius) * size) / deltaRadius;
|
||||
* mul_ - startRadius) * size) / deltaRadius);
|
||||
if (index < 0) {
|
||||
index = 0;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
colorProfile_.ReSize(RemoveDuplicates(colorProfile_, OffsetEqual));
|
||||
if (colorProfile_.Size() > 1) {
|
||||
uint32_t index;
|
||||
uint32_t start = colorProfile_[0].offset * colorLutSize_;
|
||||
uint32_t start = static_cast<uint32_t>(colorProfile_[0].offset * colorLutSize_);
|
||||
uint32_t end;
|
||||
Rgba8T color = colorProfile_[0].color;
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
* From 1 to colorprofile Interpolation color calculation between size ()
|
||||
*/
|
||||
for (index = 1; index < colorProfile_.Size(); index++) {
|
||||
end = colorProfile_[index].offset * colorLutSize_;
|
||||
end = static_cast<uint32_t>(colorProfile_[index].offset * colorLutSize_);
|
||||
ColorInterpolator ci(colorProfile_[index - 1].color,
|
||||
colorProfile_[index].color,
|
||||
end - start + 1);
|
||||
|
||||
@@ -76,8 +76,8 @@ public:
|
||||
|
||||
void Generate(Rgba8T* span, int32_t x, int32_t y, uint32_t len)
|
||||
{
|
||||
y = y - patternStartY_;
|
||||
x = x - patternStartX_;
|
||||
y = static_cast<int32_t>(y - patternStartY_);
|
||||
x = static_cast<int32_t>(x - patternStartX_);
|
||||
for (; len; --len, span++, x++) {
|
||||
if (patternRepeat_ == NO_REPEAT) {
|
||||
if (x >= patternImagewidth_ ||
|
||||
|
||||
Reference in New Issue
Block a user