From ff081539a569d57395b74da93216343291cc6246 Mon Sep 17 00:00:00 2001 From: xue <2144439972@qq.com> Date: Fri, 7 Nov 2025 18:10:10 +0800 Subject: [PATCH] =?utf8?q?=E5=A2=9E=E5=8A=A0=E9=9B=B7=E9=B8=9F=E5=BF=85?= =?utf8?q?=E8=A6=81=E5=AE=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../components/ui_label_ext_with_shadow.h | 16 ++-------------- .../components/ui_label_ext_with_shadow.cpp | 17 ++--------------- .../ui/frameworks/common/text_with_shadow.cpp | 18 ++++-------------- .../uikit/ui/frameworks/draw/draw_label.cpp | 2 ++ .../gui/uikit/ui/frameworks/draw/draw_label.h | 5 ++++- .../interfaces/kits/common/text_with_shadow.h | 18 ++++-------------- 6 files changed, 18 insertions(+), 58 deletions(-) diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_label_ext_with_shadow.h b/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_label_ext_with_shadow.h index a760e6175..062032c76 100644 --- a/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_label_ext_with_shadow.h +++ b/code/sdk/middleware/services/gui/uikit/proprietary/include/components/ui_label_ext_with_shadow.h @@ -1,17 +1,4 @@ -/* - * Copyright (c) 2020-2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +#ifdef BOARD_LEINIAO #ifndef GRAPHIC_LITE_UI_LABEL_EXT_WITH_SHADOW_H #define GRAPHIC_LITE_UI_LABEL_EXT_WITH_SHADOW_H @@ -82,3 +69,4 @@ protected: #endif // ENABLE_FONT_VECTOR_GLOBAL || ENABLE_SHAPING #endif // GRAPHIC_LITE_UI_LABEL_EXT_WITH_SHADOW_H +#endif \ No newline at end of file diff --git a/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_label_ext_with_shadow.cpp b/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_label_ext_with_shadow.cpp index 0b53f5490..558e02eb5 100644 --- a/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_label_ext_with_shadow.cpp +++ b/code/sdk/middleware/services/gui/uikit/proprietary/src/ui/frameworks/components/ui_label_ext_with_shadow.cpp @@ -1,18 +1,4 @@ -/* - * Copyright (c) 2020-2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +#ifdef BOARD_LEINIAO #include "components/ui_label_ext_with_shadow.h" #include "common/text_with_shadow.h" @@ -73,3 +59,4 @@ int16_t UILabelExtWithShadow::GetShadowOffsetY() const } } // namespace OHOS +#endif \ No newline at end of file diff --git a/code/sdk/middleware/services/gui/uikit/ui/frameworks/common/text_with_shadow.cpp b/code/sdk/middleware/services/gui/uikit/ui/frameworks/common/text_with_shadow.cpp index cb55f1d91..dc43a8ae1 100644 --- a/code/sdk/middleware/services/gui/uikit/ui/frameworks/common/text_with_shadow.cpp +++ b/code/sdk/middleware/services/gui/uikit/ui/frameworks/common/text_with_shadow.cpp @@ -1,17 +1,6 @@ -/* - * Copyright (c) 2020-2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// 自己增加阴影的阴影效果组件 +// 效果为最右与最下方两个像素显示为黑色 +#ifdef BOARD_LEINIAO #include "common/text_with_shadow.h" #include "draw/draw_label.h" @@ -89,3 +78,4 @@ void TextWithShadow::Draw(BufferInfo& gfxDstBuffer, } } // namespace OHOS +#endif \ No newline at end of file diff --git a/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_label.cpp b/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_label.cpp index dd06942ba..3374c9e08 100644 --- a/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_label.cpp +++ b/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_label.cpp @@ -59,6 +59,7 @@ void DrawLabel::DrawTextOneLine(BufferInfo& gfxDstBuffer, const LabelLineInfo& l } } } +#ifdef BOARD_LEINIAO // 雷鸟项目增加,阴影Lable子组件 void DrawLabel::DrawTextOneLineWithShadow(BufferInfo& gfxDstBuffer, const LabelLineInfo& labelLine, int16_t shadowOffsetX, int16_t shadowOffsetY) { @@ -123,6 +124,7 @@ void DrawLabel::DrawTextOneLineWithShadow(BufferInfo& gfxDstBuffer, const LabelL } } } +#endif void DrawLabel::DrawArcText(BufferInfo& gfxDstBuffer, const Rect& mask, diff --git a/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_label.h b/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_label.h index 25186bf46..13192f56d 100644 --- a/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_label.h +++ b/code/sdk/middleware/services/gui/uikit/ui/frameworks/draw/draw_label.h @@ -26,9 +26,12 @@ namespace OHOS { class DrawLabel : public HeapBase { public: static void DrawTextOneLine(BufferInfo& gfxDstBuffer, const LabelLineInfo& labelLine); + + #ifdef BOARD_LEINIAO // 雷鸟项目增加,阴影Lable子组件 static void DrawTextOneLineWithShadow(BufferInfo& gfxDstBuffer, const LabelLineInfo& labelLine, int16_t shadowOffsetX = 2, int16_t shadowOffsetY = 2); - + #endif + static void DrawArcText(BufferInfo& gfxDstBuffer, const Rect& mask, const char* text, const Point& arcCenter, uint8_t fontId, const UIArcLabel::ArcTextInfo arcTextInfo, UIArcLabel::TextOrientation orientation, const Style& style, uint8_t opaScale); diff --git a/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/common/text_with_shadow.h b/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/common/text_with_shadow.h index 6ad287b28..1afc26be3 100644 --- a/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/common/text_with_shadow.h +++ b/code/sdk/middleware/services/gui/uikit/ui/interfaces/kits/common/text_with_shadow.h @@ -1,17 +1,6 @@ -/* - * Copyright (c) 2020-2021 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// 自己增加阴影的阴影效果组件 +// 效果为最右与最下方两个像素显示为黑色 +#ifdef BOARD_LEINIAO #ifndef GRAPHIC_LITE_TEXT_WITH_SHADOW_H #define GRAPHIC_LITE_TEXT_WITH_SHADOW_H @@ -93,3 +82,4 @@ private: } // namespace OHOS #endif // GRAPHIC_LITE_TEXT_WITH_SHADOW_H +#endif \ No newline at end of file -- 2.17.1