Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
7b6b6bf8
Commit
7b6b6bf8
authored
Jun 19, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Directly store alpha in font_stack_t::text_style_t (freetype).
parent
e32bee08
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
modules/misc/text_renderer/freetype.c
modules/misc/text_renderer/freetype.c
+5
-5
No files found.
modules/misc/text_renderer/freetype.c
View file @
7b6b6bf8
...
...
@@ -623,7 +623,7 @@ static int RenderYUVP( filter_t *p_filter, subpicture_region_t *p_region,
/* Calculate text color components
* Only use the first color */
int
i_alpha
=
0xff
-
((
p_line
->
p_character
[
0
].
i_color
>>
24
)
&
0xff
)
;
int
i_alpha
=
(
p_line
->
p_character
[
0
].
i_color
>>
24
)
&
0xff
;
YUVFromRGB
(
p_line
->
p_character
[
0
].
i_color
,
&
i_y
,
&
i_u
,
&
i_v
);
/* Build palette */
...
...
@@ -846,7 +846,7 @@ static int RenderYUVA( filter_t *p_filter,
continue
;
uint32_t
i_color
=
ch
->
i_color
;
i_a
=
0xff
-
((
i_color
>>
24
)
&
0xff
)
;
i_a
=
(
i_color
>>
24
)
&
0xff
;
if
(
g
==
0
)
{
i_a
=
i_a
*
p_sys
->
i_outline_opacity
/
255
;
...
...
@@ -1160,7 +1160,7 @@ static int HandleFontAttributes( xml_reader_t *p_xml_reader,
int
rv
;
char
*
psz_fontname
=
NULL
;
uint32_t
i_font_color
=
0xffffff
;
int
i_font_alpha
=
0
;
int
i_font_alpha
=
255
;
uint32_t
i_karaoke_bg_color
=
0x00ffffff
;
int
i_font_size
=
24
;
...
...
@@ -1365,7 +1365,7 @@ static int ProcessNodes( filter_t *p_filter,
p_sys
->
psz_fontfamily
,
p_sys
->
i_font_size
,
(
p_sys
->
i_font_color
&
0xffffff
)
|
((
(
255
-
p_sys
->
i_font_opacity
)
&
0xff
)
<<
24
),
((
p_sys
->
i_font_opacity
&
0xff
)
<<
24
),
0x00ffffff
);
}
#endif
...
...
@@ -2206,7 +2206,7 @@ static int RenderCommon( filter_t *p_filter, subpicture_region_t *p_region_out,
p_style
=
CreateStyle
(
p_sys
->
psz_fontfamily
,
p_sys
->
i_font_size
,
(
p_sys
->
i_font_color
&
0xffffff
)
|
((
(
255
-
p_sys
->
i_font_opacity
)
&
0xff
)
<<
24
),
((
p_sys
->
i_font_opacity
&
0xff
)
<<
24
),
0x00ffffff
,
0
);
i_text_length
=
SetupText
(
p_filter
,
...
...
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