Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Graphic Ui
提交
63489a40
G
Graphic Ui
项目概览
OpenHarmony
/
Graphic Ui
大约 1 年 前同步成功
通知
13
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Graphic Ui
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
63489a40
编写于
10月 27, 2022
作者:
O
openharmony_ci
提交者:
Gitee
10月 27, 2022
浏览文件
操作
浏览文件
下载
差异文件
!800 修复警告#5
Merge pull request !800 from youbing54/cherry-pick-1666339944
上级
4be971ae
b036e74d
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
26 addition
and
22 deletion
+26
-22
frameworks/draw/draw_label.cpp
frameworks/draw/draw_label.cpp
+1
-1
frameworks/draw/draw_utils.cpp
frameworks/draw/draw_utils.cpp
+2
-2
frameworks/font/ui_font_bitmap.cpp
frameworks/font/ui_font_bitmap.cpp
+6
-5
frameworks/font/ui_font_vector.cpp
frameworks/font/ui_font_vector.cpp
+8
-5
interfaces/kits/components/ui_picker.h
interfaces/kits/components/ui_picker.h
+1
-1
test/uitest/test_button/ui_test_button.cpp
test/uitest/test_button/ui_test_button.cpp
+6
-4
test/uitest/test_clip/ui_test_clip.cpp
test/uitest/test_clip/ui_test_clip.cpp
+0
-2
test/uitest/test_screenshot/ui_test_screenshot.h
test/uitest/test_screenshot/ui_test_screenshot.h
+1
-1
test/unittest/components/ui_abstract_clock_unit_test.cpp
test/unittest/components/ui_abstract_clock_unit_test.cpp
+1
-1
未找到文件。
frameworks/draw/draw_label.cpp
浏览文件 @
63489a40
...
...
@@ -82,7 +82,7 @@ uint16_t DrawLabel::DrawTextOneLine(BufferInfo& gfxDstBuffer, const LabelLineInf
labelLine
.
style
.
lineSpace_
,
havebackgroundColor
,
backgroundColor
};
#if ENABLE_VECTOR_FONT
#if
defined(ENABLE_VECTOR_FONT) &&
ENABLE_VECTOR_FONT
glyphNode
.
textStyle
=
letterInfo
.
textStyle
;
#endif
glyphNode
.
advance
=
0
;
...
...
frameworks/draw/draw_utils.cpp
浏览文件 @
63489a40
...
...
@@ -91,12 +91,12 @@ namespace OHOS {
(r1) = static_cast<uint8_t>((Alpha2 * (r2) + (1 - Alpha2) * Alpha1 * (r1)) / Alpha3); \
(g1) = static_cast<uint8_t>((Alpha2 * (g2) + (1 - Alpha2) * Alpha1 * (g1)) / Alpha3); \
(b1) = static_cast<uint8_t>((Alpha2 * (b2) + (1 - Alpha2) * Alpha1 * (b1)) / Alpha3); \
(a1) = static_cast<uint8_t>(Alpha3 * OPA_OPAQUE)
;
(a1) = static_cast<uint8_t>(Alpha3 * OPA_OPAQUE)
#define COLOR_BLEND_RGB(r1, g1, b1, r2, g2, b2, a2) \
(r1) = (((r2) * (a2)) / OPA_OPAQUE) + (((r1) * (OPA_OPAQUE - (a2))) / OPA_OPAQUE); \
(g1) = (((g2) * (a2)) / OPA_OPAQUE) + (((g1) * (OPA_OPAQUE - (a2))) / OPA_OPAQUE); \
(b1) = (((b2) * (a2)) / OPA_OPAQUE) + (((b1) * (OPA_OPAQUE - (a2))) / OPA_OPAQUE)
;
(b1) = (((b2) * (a2)) / OPA_OPAQUE) + (((b1) * (OPA_OPAQUE - (a2))) / OPA_OPAQUE)
// 565
#define COLOR_FILL_BLEND(d, dm, s, sm, a) \
...
...
frameworks/font/ui_font_bitmap.cpp
浏览文件 @
63489a40
...
...
@@ -23,10 +23,10 @@
#include "gfx_utils/file.h"
#include "gfx_utils/graphic_log.h"
#include "graphic_config.h"
#if ENABLE_MULTI_FONT
#if
defined(ENABLE_MULTI_FONT) &&
ENABLE_MULTI_FONT
#include "font/ui_multi_font_manager.h"
#endif
#if ENABLE_SHAPING
#if
defined(ENABLE_SHAPING) &&
ENABLE_SHAPING
#include "font/ui_text_shaping.h"
#endif
...
...
@@ -60,9 +60,10 @@ bool UIFontBitmap::IsVectorFont() const
return
false
;
}
uint8_t
UIFontBitmap
::
GetShapingFontId
(
char
*
text
,
uint8_t
&
ttfId
,
uint32_t
&
script
,
uint16_t
fontId
,
uint8_t
size
)
const
uint8_t
UIFontBitmap
::
GetShapingFontId
(
char
*
text
,
uint8_t
&
ttfId
,
uint32_t
&
script
,
uint16_t
fontId
,
uint8_t
size
)
const
{
#if ENABLE_MULTI_FONT
#if
defined(ENABLE_MULTI_FONT) &&
ENABLE_MULTI_FONT
return
UIMultiFontManager
::
GetInstance
()
->
GetShapingFontId
(
text
,
fontId
,
ttfId
,
script
);
#else
UITextLanguageFontParam
*
fontParam
=
UIFontBuilder
::
GetInstance
()
->
GetTextLangFontsTable
(
fontId
);
...
...
@@ -157,7 +158,7 @@ int8_t UIFontBitmap::GetFontHeader(FontHeader& fontHeader, uint16_t fontId, uint
return
INVALID_RET_VALUE
;
}
#if ENABLE_MULTI_FONT
#if
defined(ENABLE_MULTI_FONT) &&
ENABLE_MULTI_FONT
int8_t
UIFontBitmap
::
GetMultiGlyphNode
(
uint32_t
unicode
,
GlyphNode
&
glyphNode
,
uint16_t
fontId
)
{
int8_t
ret
=
GetGlyphNode
(
unicode
,
glyphNode
,
fontId
);
...
...
frameworks/font/ui_font_vector.cpp
浏览文件 @
63489a40
...
...
@@ -28,7 +28,7 @@
#include "gfx_utils/graphic_log.h"
#include "graphic_config.h"
#include "securec.h"
#if ENABLE_MULTI_FONT
#if
defined(ENABLE_MULTI_FONT) &&
ENABLE_MULTI_FONT
#include "font/ui_multi_font_manager.h"
#endif
...
...
@@ -115,7 +115,7 @@ uint8_t UIFontVector::RegisterFontInfo(const char* ttfName, uint8_t shaping)
}
else
{
fontInfo_
[
j
].
fontWeight
=
BPP_BIT_8
;
}
#if ENABLE_MULTI_FONT
#if
defined(ENABLE_MULTI_FONT) &&
ENABLE_MULTI_FONT
UIMultiFontManager
::
GetInstance
()
->
UpdateScript
(
fontInfo_
[
j
]);
#endif
return
j
;
...
...
@@ -496,9 +496,10 @@ uint16_t UIFontVector::GetHeight(uint16_t fontId, uint8_t fontSize)
return
static_cast
<
uint16_t
>
(
faceInfo
.
face
->
size
->
metrics
.
height
/
FONT_PIXEL_IN_POINT
);
}
uint8_t
UIFontVector
::
GetShapingFontId
(
char
*
text
,
uint8_t
&
ttfId
,
uint32_t
&
script
,
uint16_t
fontId
,
uint8_t
size
)
const
uint8_t
UIFontVector
::
GetShapingFontId
(
char
*
text
,
uint8_t
&
ttfId
,
uint32_t
&
script
,
uint16_t
fontId
,
uint8_t
size
)
const
{
#if ENABLE_MULTI_FONT
#if
defined(ENABLE_MULTI_FONT) &&
ENABLE_MULTI_FONT
const
UITextLanguageFontParam
*
fontParam1
=
GetFontInfo
(
fontId
);
if
(
fontParam1
==
nullptr
)
{
return
0
;
...
...
@@ -523,7 +524,7 @@ uint8_t UIFontVector::GetShapingFontId(char* text, uint8_t& ttfId, uint32_t& scr
}
ttfId
=
fontParam1
->
ttfId
;
#if ENABLE_SHAPING
#if
defined(ENABLE_SHAPING) &&
ENABLE_SHAPING
script
=
UIMultiFontManager
::
GetInstance
()
->
GetScriptByTtfId
(
ttfId
);
#endif
return
fontParam1
->
shaping
;
...
...
@@ -536,6 +537,7 @@ uint8_t UIFontVector::GetShapingFontId(char* text, uint8_t& ttfId, uint32_t& scr
return
fontInfo
->
shaping
;
#endif
}
uint16_t
UIFontVector
::
GetFontId
(
const
char
*
ttfName
,
uint8_t
fontSize
)
const
{
if
(
ttfName
!=
nullptr
)
{
...
...
@@ -713,6 +715,7 @@ void UIFontVector::SetItaly(FT_GlyphSlot slot)
FT_Outline
outline
=
slot
->
outline
;
FT_Outline_Transform
(
&
outline
,
&
matrix
);
}
void
UIFontVector
::
SetBold
(
uint16_t
fontId
)
{
int32_t
error
;
...
...
interfaces/kits/components/ui_picker.h
浏览文件 @
63489a40
...
...
@@ -339,7 +339,7 @@ public:
*/
virtual
void
OnPickerStoped
(
UIPicker
&
picker
)
{}
/**
* @brief Called when an item is selected during sliding. This function is implemented by applications.
* @brief Called when an item is selected during sliding. This function is implemented by applications.
*
* @param picker Indicates the picker instance.
* @since 1.0
...
...
test/uitest/test_button/ui_test_button.cpp
浏览文件 @
63489a40
...
...
@@ -576,7 +576,7 @@ private:
bool
touchable_
;
};
#if DEFAULT_ANIMATION
#if
defined(DEFAULT_ANIMATION) &&
DEFAULT_ANIMATION
class
TestBtnAnimationListener
:
public
UIView
::
OnClickListener
{
public:
TestBtnAnimationListener
(
UIView
*
uiView
,
bool
enableAnimation
)
:
uiView_
(
uiView
),
enableAnimation_
(
enableAnimation
)
...
...
@@ -708,8 +708,9 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
container
->
Add
(
button14
);
container
->
Add
(
button15
);
#if DEFAULT_ANIMATION
UILabelButton
*
button16
=
GetTestUIButton
(
"开启动效"
,
340
,
1040
,
button
);
// 340: x-coordinate, 1040: y-coordinate
#if defined(DEFAULT_ANIMATION) && DEFAULT_ANIMATION
// 340: x-coordinate, 1040: y-coordinate
UILabelButton
*
button16
=
GetTestUIButton
(
"开启动效"
,
340
,
1040
,
button
);
if
(
enableAnimationListener_
==
nullptr
)
{
enableAnimationListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
...
...
@@ -717,7 +718,8 @@ void UITestBUTTON::UIKitButtonTest002(UIScrollView* container, UIButton* button)
}
button16
->
SetOnClickListener
(
enableAnimationListener_
);
UILabelButton
*
button17
=
GetTestUIButton
(
"关闭动效"
,
340
,
1090
,
button
);
// 340: x-coordinate, 1090: y-coordinate
// 340: x-coordinate, 1090: y-coordinate
UILabelButton
*
button17
=
GetTestUIButton
(
"关闭动效"
,
340
,
1090
,
button
);
if
(
disableAnimationListener_
==
nullptr
)
{
disableAnimationListener_
=
static_cast
<
UIView
::
OnClickListener
*>
(
new
TestBtnAnimationListener
(
reinterpret_cast
<
UIView
*>
(
button
),
false
));
...
...
test/uitest/test_clip/ui_test_clip.cpp
浏览文件 @
63489a40
...
...
@@ -267,7 +267,6 @@ void UITestClip::UIKitClipTest004()
CreateTitleLabel
(
"贝塞尔曲线裁剪 "
);
ClipPath
path
;
// {50, 50}, {100, 50}, {100, 100}, {50, 100}: path points; {60, 110}, {80, 10}: control points of curve
path
.
MoveTo
({
50
,
50
}).
CurveTo
({
60
,
110
},
{
80
,
10
},
{
100
,
50
}).
LineTo
({
100
,
100
}).
LineTo
({
50
,
100
});
UIImageView
*
imageView
=
CreateImageView
();
...
...
@@ -282,7 +281,6 @@ void UITestClip::UIKitClipTest005()
CreateTitleLabel
(
"多边形裁剪 "
);
ClipPath
path
;
// {20, 70}, {50, 60}, {110, 80}, {110, 130}, {50, 100}, {20, 120}: path points
path
.
MoveTo
({
20
,
70
}).
LineTo
({
50
,
60
}).
LineTo
({
110
,
80
}).
LineTo
({
110
,
130
}).
LineTo
({
50
,
100
}).
LineTo
({
20
,
120
});
UIImageView
*
imageView
=
CreateImageView
();
...
...
test/uitest/test_screenshot/ui_test_screenshot.h
浏览文件 @
63489a40
...
...
@@ -17,7 +17,7 @@
#define UI_TEST_SCREENSHOT_H
#include "graphic_config.h"
#if ENABLE_DEBUG
#if
defined(ENABLE_DEBUG) &&
ENABLE_DEBUG
#include "components/ui_scroll_view.h"
#include "components/ui_label.h"
#include "components/ui_label_button.h"
...
...
test/unittest/components/ui_abstract_clock_unit_test.cpp
浏览文件 @
63489a40
...
...
@@ -27,7 +27,7 @@ namespace {
const
uint8_t
INIT_HOUR
=
24
;
const
uint8_t
INIT_MINUTE
=
60
;
const
uint8_t
INIT_SECOND
=
60
;
const
bool
clockInit
=
1
;
const
bool
CLOCK_INT
=
1
;
}
class
UIAbstractClockUnitTest
:
public
testing
::
Test
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录