Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Graphic Ui
提交
17629005
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,发现更多精彩内容 >>
未验证
提交
17629005
编写于
10月 14, 2022
作者:
O
openharmony_ci
提交者:
Gitee
10月 14, 2022
浏览文件
操作
浏览文件
下载
差异文件
!778 代码告警处理#2
Merge pull request !778 from youbing54/master
上级
18b24152
e7a0e84c
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
26 addition
and
26 deletion
+26
-26
frameworks/components/ui_canvas.cpp
frameworks/components/ui_canvas.cpp
+5
-5
frameworks/draw/draw_canvas.h
frameworks/draw/draw_canvas.h
+6
-6
frameworks/draw/draw_utils.cpp
frameworks/draw/draw_utils.cpp
+2
-2
frameworks/draw/draw_utils.h
frameworks/draw/draw_utils.h
+2
-2
frameworks/font/ui_font.cpp
frameworks/font/ui_font.cpp
+2
-2
frameworks/font/ui_font_cache.h
frameworks/font/ui_font_cache.h
+1
-1
frameworks/font/ui_font_vector.cpp
frameworks/font/ui_font_vector.cpp
+1
-1
interfaces/innerkits/font/ui_font_bitmap.h
interfaces/innerkits/font/ui_font_bitmap.h
+1
-1
interfaces/innerkits/font/ui_font_vector.h
interfaces/innerkits/font/ui_font_vector.h
+3
-3
test/framework/include/test_resource_config.h
test/framework/include/test_resource_config.h
+1
-1
tools/qt/simulator/drivers/indev/key_input.h
tools/qt/simulator/drivers/indev/key_input.h
+1
-1
tools/qt/simulator/drivers/indev/mouse_input.h
tools/qt/simulator/drivers/indev/mouse_input.h
+1
-1
未找到文件。
frameworks/components/ui_canvas.cpp
浏览文件 @
17629005
...
@@ -707,8 +707,8 @@ void OnBlendDrawGradient(ListNode<UICanvas::DrawCmd>* curDraw,
...
@@ -707,8 +707,8 @@ void OnBlendDrawGradient(ListNode<UICanvas::DrawCmd>* curDraw,
DrawCanvas
::
BuildLineGradientMatrix
(
drawCmd
.
paint
,
gradientMatrix
,
transform
,
distance
);
DrawCanvas
::
BuildLineGradientMatrix
(
drawCmd
.
paint
,
gradientMatrix
,
transform
,
distance
);
GradientLinearCalculate
gradientLinearCalculate
;
GradientLinearCalculate
gradientLinearCalculate
;
FillGradient
span
(
interpolatorType
,
gradientLinearCalculate
,
gradientColorMode
,
0
,
distance
);
FillGradient
span
(
interpolatorType
,
gradientLinearCalculate
,
gradientColorMode
,
0
,
distance
);
UICanvas
::
BlendRaster
(
drawCmd
.
paint
,
drawCmd
.
param
,
blendRasterizer
,
rasterizer
,
renBase
,
transform
,
span
,
trunc
,
UICanvas
::
BlendRaster
(
drawCmd
.
paint
,
drawCmd
.
param
,
blendRasterizer
,
rasterizer
,
renBase
,
pathParamBlend
->
isStroke
);
transform
,
span
,
trunc
,
pathParamBlend
->
isStroke
);
}
}
if
(
curDraw
->
data_
.
paint
.
GetGradient
()
==
Paint
::
Radial
)
{
if
(
curDraw
->
data_
.
paint
.
GetGradient
()
==
Paint
::
Radial
)
{
Paint
::
RadialGradientPoint
radialPoint
=
drawCmd
.
paint
.
GetRadialGradientPoint
();
Paint
::
RadialGradientPoint
radialPoint
=
drawCmd
.
paint
.
GetRadialGradientPoint
();
...
@@ -718,8 +718,8 @@ void OnBlendDrawGradient(ListNode<UICanvas::DrawCmd>* curDraw,
...
@@ -718,8 +718,8 @@ void OnBlendDrawGradient(ListNode<UICanvas::DrawCmd>* curDraw,
GradientRadialCalculate
gradientRadialCalculate
(
endRadius
,
radialPoint
.
x0
-
radialPoint
.
x1
,
GradientRadialCalculate
gradientRadialCalculate
(
endRadius
,
radialPoint
.
x0
-
radialPoint
.
x1
,
radialPoint
.
y0
-
radialPoint
.
y1
);
radialPoint
.
y0
-
radialPoint
.
y1
);
FillGradient
span
(
interpolatorType
,
gradientRadialCalculate
,
gradientColorMode
,
startRadius
,
endRadius
);
FillGradient
span
(
interpolatorType
,
gradientRadialCalculate
,
gradientColorMode
,
startRadius
,
endRadius
);
UICanvas
::
BlendRaster
(
drawCmd
.
paint
,
drawCmd
.
param
,
blendRasterizer
,
rasterizer
,
renBase
,
transform
,
span
,
trunc
,
UICanvas
::
BlendRaster
(
drawCmd
.
paint
,
drawCmd
.
param
,
blendRasterizer
,
rasterizer
,
renBase
,
pathParamBlend
->
isStroke
);
transform
,
span
,
trunc
,
pathParamBlend
->
isStroke
);
}
}
}
}
#endif
#endif
...
@@ -1015,7 +1015,7 @@ void UICanvas::DoDrawImage(BufferInfo& gfxDstBuffer,
...
@@ -1015,7 +1015,7 @@ void UICanvas::DoDrawImage(BufferInfo& gfxDstBuffer,
imageView
->
SetPosition
(
start
.
x
,
start
.
y
);
imageView
->
SetPosition
(
start
.
x
,
start
.
y
);
if
(
!
paint
.
GetTransAffine
().
IsIdentity
())
{
if
(
!
paint
.
GetTransAffine
().
IsIdentity
())
{
float
angle
=
paint
.
GetRotateAngle
();
float
angle
=
paint
.
GetRotateAngle
();
imageView
->
Rotate
(
MATH_ROUND
(
angle
),
Vector2
<
float
>
(
0
,
0
));
imageView
->
Rotate
(
MATH_ROUND
(
angle
),
Vector2
<
float
>
(
0
,
0
));
imageView
->
Translate
(
Vector3
<
int16_t
>
(
paint
.
GetTranslateX
(),
paint
.
GetTranslateY
(),
1
));
imageView
->
Translate
(
Vector3
<
int16_t
>
(
paint
.
GetTranslateX
(),
paint
.
GetTranslateY
(),
1
));
Vector2
<
float
>
scale
(
static_cast
<
float
>
(
paint
.
GetScaleX
()),
static_cast
<
float
>
(
paint
.
GetScaleY
()));
Vector2
<
float
>
scale
(
static_cast
<
float
>
(
paint
.
GetScaleX
()),
static_cast
<
float
>
(
paint
.
GetScaleY
()));
imageView
->
Scale
(
scale
,
Vector2
<
float
>
(
0
,
0
));
imageView
->
Scale
(
scale
,
Vector2
<
float
>
(
0
,
0
));
...
...
frameworks/draw/draw_canvas.h
浏览文件 @
17629005
...
@@ -53,7 +53,7 @@ public:
...
@@ -53,7 +53,7 @@ public:
const
Style
&
style
,
const
Style
&
style
,
const
bool
&
isStroke
);
const
bool
&
isStroke
);
#if GRAPHIC_ENABLE_SHADOW_EFFECT_FLAG
#if
defined(GRAPHIC_ENABLE_SHADOW_EFFECT_FLAG) &&
GRAPHIC_ENABLE_SHADOW_EFFECT_FLAG
static
void
DoDrawShadow
(
BufferInfo
&
gfxDstBuffer
,
static
void
DoDrawShadow
(
BufferInfo
&
gfxDstBuffer
,
void
*
param
,
void
*
param
,
const
Paint
&
paint
,
const
Paint
&
paint
,
...
@@ -76,7 +76,7 @@ public:
...
@@ -76,7 +76,7 @@ public:
TransAffine
&
transform
,
TransAffine
&
transform
,
const
bool
&
isStroke
);
const
bool
&
isStroke
);
#if GRAPHIC_ENABLE_GRADIENT_FILL_FLAG
#if
defined(GRAPHIC_ENABLE_GRADIENT_FILL_FLAG) &&
GRAPHIC_ENABLE_GRADIENT_FILL_FLAG
/**
/**
* Render gradient
* Render gradient
*/
*/
...
@@ -113,7 +113,7 @@ public:
...
@@ -113,7 +113,7 @@ public:
float
&
endRadius
);
float
&
endRadius
);
#endif // GRAPHIC_ENABLE_GRADIENT_FILL_FLAG
#endif // GRAPHIC_ENABLE_GRADIENT_FILL_FLAG
#if GRAPHIC_ENABLE_PATTERN_FILL_FLAG
#if
defined(GRAPHIC_ENABLE_PATTERN_FILL_FLAG) &&
GRAPHIC_ENABLE_PATTERN_FILL_FLAG
/**
/**
* Render pattern mode
* Render pattern mode
*/
*/
...
@@ -154,10 +154,10 @@ public:
...
@@ -154,10 +154,10 @@ public:
template
<
class
LineStyle
>
static
void
LineStyleCalc
(
DepictStroke
<
LineStyle
>&
strokeLineStyle
,
const
Paint
&
paint
)
template
<
class
LineStyle
>
static
void
LineStyleCalc
(
DepictStroke
<
LineStyle
>&
strokeLineStyle
,
const
Paint
&
paint
)
{
{
strokeLineStyle
.
SetWidth
(
paint
.
GetStrokeWidth
());
// Line style related
strokeLineStyle
.
SetWidth
(
paint
.
GetStrokeWidth
());
// Line style related
#if GRAPHIC_ENABLE_LINECAP_FLAG
#if
defined(GRAPHIC_ENABLE_LINECAP_FLAG) &&
GRAPHIC_ENABLE_LINECAP_FLAG
strokeLineStyle
.
SetLineCap
(
paint
.
GetLineCap
());
strokeLineStyle
.
SetLineCap
(
paint
.
GetLineCap
());
#endif
#endif
#if GRAPHIC_ENABLE_LINEJOIN_FLAG
#if
defined(GRAPHIC_ENABLE_LINEJOIN_FLAG) &&
GRAPHIC_ENABLE_LINEJOIN_FLAG
strokeLineStyle
.
SetLineJoin
(
paint
.
GetLineJoin
());
strokeLineStyle
.
SetLineJoin
(
paint
.
GetLineJoin
());
if
(
paint
.
GetMiterLimit
()
>
0
)
{
if
(
paint
.
GetMiterLimit
()
>
0
)
{
strokeLineStyle
.
SetMiterLimit
(
paint
.
GetMiterLimit
());
strokeLineStyle
.
SetMiterLimit
(
paint
.
GetMiterLimit
());
...
@@ -165,7 +165,7 @@ public:
...
@@ -165,7 +165,7 @@ public:
#endif
#endif
};
};
#if GRAPHIC_ENABLE_DASH_GENERATE_FLAG
#if
defined(GRAPHIC_ENABLE_DASH_GENERATE_FLAG) &&
GRAPHIC_ENABLE_DASH_GENERATE_FLAG
/**
/**
* Set linedash style
* Set linedash style
*/
*/
...
...
frameworks/draw/draw_utils.cpp
浏览文件 @
17629005
...
@@ -346,8 +346,8 @@ void DrawUtils::DrawNormalLetter(BufferInfo& gfxDstBuffer,
...
@@ -346,8 +346,8 @@ void DrawUtils::DrawNormalLetter(BufferInfo& gfxDstBuffer,
}
}
if
(
letterInfo
.
havebackgroundColor
)
{
if
(
letterInfo
.
havebackgroundColor
)
{
Rect
backgroundRect
(
posX
,
letterInfo
.
mask
.
GetTop
(),
Rect
backgroundRect
(
posX
,
letterInfo
.
mask
.
GetTop
(),
posX
+
letterW
+
letterInfo
.
letterSpace_
-
1
,
posX
+
letterW
+
letterInfo
.
letterSpace_
-
1
,
letterInfo
.
mask
.
GetBottom
()
-
letterInfo
.
lineSpace_
);
letterInfo
.
mask
.
GetBottom
()
-
letterInfo
.
lineSpace_
);
Style
style
;
Style
style
;
style
.
bgColor_
=
letterInfo
.
backgroundColor
;
style
.
bgColor_
=
letterInfo
.
backgroundColor
;
BaseGfxEngine
::
GetInstance
()
->
DrawRect
(
gfxDstBuffer
,
backgroundRect
,
BaseGfxEngine
::
GetInstance
()
->
DrawRect
(
gfxDstBuffer
,
backgroundRect
,
...
...
frameworks/draw/draw_utils.h
浏览文件 @
17629005
...
@@ -74,7 +74,7 @@ struct LabelLineInfo {
...
@@ -74,7 +74,7 @@ struct LabelLineInfo {
UITextLanguageDirect
direct
;
UITextLanguageDirect
direct
;
uint32_t
*
codePoints
;
uint32_t
*
codePoints
;
bool
baseLine
;
bool
baseLine
;
#if ENABLE_VECTOR_FONT
#if
defined(ENABLE_VECTOR_FONT) &&
ENABLE_VECTOR_FONT
TextStyle
*
textStyles
;
TextStyle
*
textStyles
;
#endif
#endif
List
<
BackgroundColor
>*
backgroundColor
;
List
<
BackgroundColor
>*
backgroundColor
;
...
@@ -97,7 +97,7 @@ struct LabelLetterInfo {
...
@@ -97,7 +97,7 @@ struct LabelLetterInfo {
uint8_t
fontId
;
uint8_t
fontId
;
uint8_t
shapingId
;
uint8_t
shapingId
;
uint8_t
fontSize
;
uint8_t
fontSize
;
#if ENABLE_VECTOR_FONT
#if
defined(ENABLE_VECTOR_FONT) &&
ENABLE_VECTOR_FONT
TextStyle
textStyle
;
TextStyle
textStyle
;
#endif
#endif
bool
baseLine
;
bool
baseLine
;
...
...
frameworks/font/ui_font.cpp
浏览文件 @
17629005
...
@@ -29,9 +29,9 @@
...
@@ -29,9 +29,9 @@
namespace
OHOS
{
namespace
OHOS
{
bool
UIFont
::
setFontAllocFlag_
=
false
;
bool
UIFont
::
setFontAllocFlag_
=
false
;
UIFont
::
UIFont
()
:
instance_
(
nullptr
),
defaultInstance_
(
nullptr
){}
UIFont
::
UIFont
()
:
instance_
(
nullptr
),
defaultInstance_
(
nullptr
)
{}
UIFont
::~
UIFont
(){}
UIFont
::~
UIFont
()
{}
UIFont
*
UIFont
::
GetInstance
()
UIFont
*
UIFont
::
GetInstance
()
{
{
...
...
frameworks/font/ui_font_cache.h
浏览文件 @
17629005
...
@@ -54,7 +54,7 @@ public:
...
@@ -54,7 +54,7 @@ public:
ListHead
lruHead
;
ListHead
lruHead
;
uint8_t
fontId
;
uint8_t
fontId
;
uint32_t
unicode
;
uint32_t
unicode
;
#if ENABLE_VECTOR_FONT
#if
defined(ENABLE_VECTOR_FONT) &&
ENABLE_VECTOR_FONT
TextStyle
textStyle
;
TextStyle
textStyle
;
#endif
#endif
uint8_t
data
[];
uint8_t
data
[];
...
...
frameworks/font/ui_font_vector.cpp
浏览文件 @
17629005
...
@@ -144,7 +144,7 @@ uint8_t UIFontVector::RegisterFontInfo(const UITextLanguageFontParam* fontsTable
...
@@ -144,7 +144,7 @@ uint8_t UIFontVector::RegisterFontInfo(const UITextLanguageFontParam* fontsTable
return
count
;
return
count
;
}
}
/
* Note: when use ttc font file, freetype should export FT_Stream_New/FT_Stream_Free function*/
/
/ Note: when use ttc font file, freetype should export FT_Stream_New/FT_Stream_Free function
uint8_t
UIFontVector
::
RegisterTtcFontInfo
(
const
char
*
ttcName
,
TtfInfo
*
ttfInfo
,
uint8_t
count
)
uint8_t
UIFontVector
::
RegisterTtcFontInfo
(
const
char
*
ttcName
,
TtfInfo
*
ttfInfo
,
uint8_t
count
)
{
{
if
((
ttcName
==
nullptr
)
||
!
freeTypeInited_
)
{
if
((
ttcName
==
nullptr
)
||
!
freeTypeInited_
)
{
...
...
interfaces/innerkits/font/ui_font_bitmap.h
浏览文件 @
17629005
...
@@ -60,7 +60,7 @@ protected:
...
@@ -60,7 +60,7 @@ protected:
private:
private:
uint8_t
*
SearchInFont
(
uint32_t
unicode
,
GlyphNode
&
glyphNode
,
uint8_t
fontId
);
uint8_t
*
SearchInFont
(
uint32_t
unicode
,
GlyphNode
&
glyphNode
,
uint8_t
fontId
);
int16_t
GetWidthInFontId
(
uint32_t
unicode
,
uint8_t
fontId
);
int16_t
GetWidthInFontId
(
uint32_t
unicode
,
uint8_t
fontId
);
#if ENABLE_MULTI_FONT
#if
defined(ENABLE_MULTI_FONT) &&
ENABLE_MULTI_FONT
int8_t
GetMultiGlyphNode
(
uint32_t
unicode
,
GlyphNode
&
glyphNode
,
uint8_t
fontId
);
int8_t
GetMultiGlyphNode
(
uint32_t
unicode
,
GlyphNode
&
glyphNode
,
uint8_t
fontId
);
#endif
#endif
void
CloseFontFd
();
void
CloseFontFd
();
...
...
interfaces/innerkits/font/ui_font_vector.h
浏览文件 @
17629005
...
@@ -87,17 +87,17 @@ private:
...
@@ -87,17 +87,17 @@ private:
};
};
TtcInfo
ttcInfos_
[
FONT_ID_MAX
]
=
{};
TtcInfo
ttcInfos_
[
FONT_ID_MAX
]
=
{};
void
SetFace
(
FaceInfo
&
faceInfo
,
uint32_t
unicode
)
const
;
void
SetFace
(
FaceInfo
&
faceInfo
,
uint32_t
unicode
)
const
;
#if ENABLE_VECTOR_FONT
#if
defined(ENABLE_VECTOR_FONT) &&
ENABLE_VECTOR_FONT
void
SetFace
(
FaceInfo
&
faceInfo
,
uint32_t
unicode
,
TextStyle
textStyle
)
const
;
void
SetFace
(
FaceInfo
&
faceInfo
,
uint32_t
unicode
,
TextStyle
textStyle
)
const
;
#endif
#endif
uint8_t
GetFontId
(
uint32_t
unicode
)
const
;
uint8_t
GetFontId
(
uint32_t
unicode
)
const
;
uint32_t
GetKey
(
uint8_t
fontId
,
uint32_t
size
);
uint32_t
GetKey
(
uint8_t
fontId
,
uint32_t
size
);
int8_t
LoadGlyphIntoFace
(
uint8_t
&
fontId
,
uint32_t
unicode
,
FT_Face
face
);
int8_t
LoadGlyphIntoFace
(
uint8_t
&
fontId
,
uint32_t
unicode
,
FT_Face
face
);
#if ENABLE_VECTOR_FONT
#if
defined(ENABLE_VECTOR_FONT) &&
ENABLE_VECTOR_FONT
int8_t
LoadGlyphIntoFace
(
uint8_t
&
fontId
,
uint32_t
unicode
,
FT_Face
face
,
TextStyle
textStyle
);
int8_t
LoadGlyphIntoFace
(
uint8_t
&
fontId
,
uint32_t
unicode
,
FT_Face
face
,
TextStyle
textStyle
);
#endif
#endif
uint8_t
IsGlyphFont
(
uint32_t
unicode
);
uint8_t
IsGlyphFont
(
uint32_t
unicode
);
#if ENABLE_VECTOR_FONT
#if
defined(ENABLE_VECTOR_FONT) &&
ENABLE_VECTOR_FONT
void
SetItaly
(
FT_GlyphSlot
slot
);
void
SetItaly
(
FT_GlyphSlot
slot
);
void
SetBold
(
uint8_t
fontId
);
void
SetBold
(
uint8_t
fontId
);
#endif
#endif
...
...
test/framework/include/test_resource_config.h
浏览文件 @
17629005
...
@@ -58,7 +58,7 @@ namespace OHOS {
...
@@ -58,7 +58,7 @@ namespace OHOS {
#define PNG_24_RGB_IMAGE_PATH (IMAGE_DIR "png_24_rgb.png")
#define PNG_24_RGB_IMAGE_PATH (IMAGE_DIR "png_24_rgb.png")
#define PNG_32_RGB_ALPHA_IMAGE_PATH (IMAGE_DIR "png_32_rgba.png")
#define PNG_32_RGB_ALPHA_IMAGE_PATH (IMAGE_DIR "png_32_rgba.png")
#define GIF_IMAGE_PATH (IMAGE_DIR "gifImage.gif")
#define GIF_IMAGE_PATH (IMAGE_DIR "gifImage.gif")
#if (ENABLE_GIF == 1)
#if
defined(ENABLE_GIF) &&
(ENABLE_GIF == 1)
#define GIF_IMAGE_PATH1 (IMAGE_DIR "gif_image1.gif")
#define GIF_IMAGE_PATH1 (IMAGE_DIR "gif_image1.gif")
#define GIF_IMAGE_PATH2 (IMAGE_DIR "gif_image2.gif")
#define GIF_IMAGE_PATH2 (IMAGE_DIR "gif_image2.gif")
#define GIF_IMAGE_PATH_ERROR (IMAGE_DIR "gif_error.gif")
#define GIF_IMAGE_PATH_ERROR (IMAGE_DIR "gif_error.gif")
...
...
tools/qt/simulator/drivers/indev/key_input.h
浏览文件 @
17629005
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#include "dock/key_input_device.h"
#include "dock/key_input_device.h"
namespace
OHOS
{
namespace
OHOS
{
#if USE_KEY
#if
defined(USE_KEY) &&
USE_KEY
class
KeyInput
:
public
KeyInputDevice
{
class
KeyInput
:
public
KeyInputDevice
{
public:
public:
KeyInput
()
:
leftButtonDown_
(
false
),
lastX_
(
0
),
lastY_
(
0
)
{}
KeyInput
()
:
leftButtonDown_
(
false
),
lastX_
(
0
),
lastY_
(
0
)
{}
...
...
tools/qt/simulator/drivers/indev/mouse_input.h
浏览文件 @
17629005
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#include "dock/pointer_input_device.h"
#include "dock/pointer_input_device.h"
namespace
OHOS
{
namespace
OHOS
{
#if USE_MOUSE
#if
defined(USE_MOUSE) &&
USE_MOUSE
class
MouseInput
:
public
PointerInputDevice
{
class
MouseInput
:
public
PointerInputDevice
{
public:
public:
MouseInput
()
:
leftButtonDown_
(
false
),
lastX_
(
0
),
lastY_
(
0
)
{}
MouseInput
()
:
leftButtonDown_
(
false
),
lastX_
(
0
),
lastY_
(
0
)
{}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录