Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
HybridOS
hiDOMLayout
Commits
a07b7029
Commit
a07b7029
authored
May 03, 2021
by
XueShuming
Browse files
impl svg->stroke_width
parent
a777d95b
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/hidomlayout.h
View file @
a07b7029
...
...
@@ -577,6 +577,20 @@ typedef enum HLFontVariantEnum_ {
HL_FONT_VARIANT_SMALL_CAPS
=
0x2
}
HLFontVariantEnum
;
typedef
enum
HLStrokeWidthEnum_
{
HL_STROKE_WIDTH_INHERIT
=
0x0
,
HL_STROKE_WIDTH_SET
=
0X1
,
HL_STROKE_WIDTH_AUTO
=
0x2
}
HLStrokeWidthEnum
;
typedef
enum
HL_UNIT_ENUM_
{
HL_UNIT_PX
=
0x00
,
HL_UNIT_EX
=
0x01
,
HL_UNIT_EM
=
0x02
,
HL_UNIT_IN
=
0x03
,
HL_UNIT_PCT
=
0x15
,
/* Percentage */
}
HL_UNIT_ENUM
;
typedef
struct
HLUsedSvgValues_
{
HLBaseLineShiftEnum
baseline_shift
;
char
*
clip_path
;
...
...
@@ -645,6 +659,9 @@ typedef struct HLUsedSvgValues_ {
HLStrokeOpacityEnum
stroke_opacity_type
;
hl_real_t
stroke_opacity
;
HLStrokeWidthEnum
stroke_width_type
;
HL_UNIT_ENUM
stroke_width_unit
;
hl_real_t
stroke_width
;
HLTextAnchorEnum
text_anchor
;
HLTextDecorationEnum
text_decoration
;
...
...
src/layout/src/node.c
View file @
a07b7029
...
...
@@ -410,6 +410,11 @@ HLUsedSvgValues* hilayout_element_node_get_used_svg_value(HLDomElementNode* node
svg
->
stroke_opacity
=
FIXTOFLT
(
stroke_opacity
);
}
// stroke-width
css_fixed
stroke_width_length
;
css_unit
stroke_width_unit
;
svg
->
stroke_width_type
=
css_computed_stroke_width
(
style
,
&
stroke_width_length
,
&
stroke_width_unit
);
svg
->
stroke_width_unit
=
stroke_width_unit
;
svg
->
stroke_width
=
FIXTOFLT
(
stroke_width_length
);
// text-anchor
svg
->
text_anchor
=
css_computed_text_anchor
(
style
);
// text-decoration
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment