mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 15:10:30 +00:00
!34420 [NDK] fix linearGradient and blur
Merge pull request !34420 from lisitao/li_7
This commit is contained in:
commit
f00990dda2
@ -3940,6 +3940,7 @@ Dimension ViewAbstract::GetFrontBlur(FrameNode* frameNode)
|
||||
auto target = frameNode->GetRenderContext();
|
||||
CHECK_NULL_RETURN(target, value);
|
||||
auto& property = target->GetForeground();
|
||||
CHECK_NULL_RETURN(property, value);
|
||||
auto getValue = property->propBlurRadius;
|
||||
if (getValue.has_value()) {
|
||||
return getValue.value();
|
||||
|
@ -43,6 +43,7 @@ struct ArkUI_Node {
|
||||
void* swiperIndicator = nullptr;
|
||||
void* imageFrameInfos = nullptr;
|
||||
void* drawableDescriptor = nullptr;
|
||||
int32_t linearGradientDirection = -1;
|
||||
};
|
||||
|
||||
struct ArkUI_Context {
|
||||
|
@ -1302,6 +1302,8 @@ int32_t SetLinearGradient(ArkUI_NodeHandle node, const ArkUI_AttributeItem* item
|
||||
if (item->object == nullptr) {
|
||||
return ERROR_CODE_PARAM_INVALID;
|
||||
}
|
||||
//save direction value in node;
|
||||
node->linearGradientDirection = item->value[NUM_1].i32;
|
||||
auto* fullImpl = GetFullImpl();
|
||||
const ArkUI_ColorStop* colorStop = reinterpret_cast<ArkUI_ColorStop*>(item->object);
|
||||
int size = colorStop->size;
|
||||
@ -1338,7 +1340,7 @@ const ArkUI_AttributeItem* GetLinearGradient(ArkUI_NodeHandle node)
|
||||
//angle
|
||||
g_numberValues[0].f32 = values[0];
|
||||
//direction
|
||||
g_numberValues[1].i32 = values[1];
|
||||
g_numberValues[1].i32 = node->linearGradientDirection > -1 ? node->linearGradientDirection : values[1];
|
||||
//repeated
|
||||
g_numberValues[2].i32 = values[2];
|
||||
//size
|
||||
|
Loading…
Reference in New Issue
Block a user