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
bb9834b5
Commit
bb9834b5
authored
Aug 23, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
text_style: fix alpha values
parent
a222da2d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
22 deletions
+15
-22
include/vlc_text_style.h
include/vlc_text_style.h
+8
-15
modules/text_renderer/freetype.c
modules/text_renderer/freetype.c
+1
-1
modules/text_renderer/text_layout.c
modules/text_renderer/text_layout.c
+1
-1
src/misc/text_style.c
src/misc/text_style.c
+5
-5
No files found.
include/vlc_text_style.h
View file @
bb9834b5
...
...
@@ -50,36 +50,29 @@ typedef struct
int
i_font_size
;
/**< The font size in pixels */
int
i_font_color
;
/**< The color of the text 0xRRGGBB
(native endianness) */
uint8_t
i_font_alpha
;
/**< The transparency of the text.
0x00 is fully opaque,
0xFF fully transparent */
uint8_t
i_font_alpha
;
/**< The transparency of the text.*/
int
i_spacing
;
/**< The spaceing between glyphs in pixels */
/* Outline */
int
i_outline_color
;
/**< The color of the outline 0xRRGGBB */
uint8_t
i_outline_alpha
;
/**< The transparency of the outline.
0x00 is fully opaque,
0xFF fully transparent */
uint8_t
i_outline_alpha
;
/**< The transparency of the outline */
int
i_outline_width
;
/**< The width of the outline in pixels */
/* Shadow */
int
i_shadow_color
;
/**< The color of the shadow 0xRRGGBB */
uint8_t
i_shadow_alpha
;
/**< The transparency of the shadow.
0x00 is fully opaque,
0xFF fully transparent */
uint8_t
i_shadow_alpha
;
/**< The transparency of the shadow. */
int
i_shadow_width
;
/**< The width of the shadow in pixels */
/* Background (and karaoke) */
int
i_background_color
;
/**< The color of the background 0xRRGGBB */
uint8_t
i_background_alpha
;
/**< The transparency of the background.
0x00 is fully opaque,
0xFF fully transparent */
uint8_t
i_background_alpha
;
/**< The transparency of the background */
int
i_karaoke_background_color
;
/**< Background color for karaoke 0xRRGGBB */
uint8_t
i_karaoke_background_alpha
;
/**< The transparency of the karaoke bg.
0x00 is fully opaque,
0xFF fully transparent */
uint8_t
i_karaoke_background_alpha
;
/**< The transparency of the karaoke bg */
}
text_style_t
;
#define STYLE_ALPHA_OPAQUE 0xFF
#define STYLE_ALPHA_TRANSPARENT 0x00
/* Features flags for \ref i_features */
#define STYLE_NO_DEFAULTS 0x0
#define STYLE_FULLY_SET 0xFFFF
...
...
modules/text_renderer/freetype.c
View file @
bb9834b5
...
...
@@ -792,7 +792,7 @@ static inline int RenderAXYZ( filter_t *p_filter,
if
(
p_region
->
b_renderbg
)
{
/* Render the background just under the text */
FillPicture
(
p_picture
,
0x00
,
0x00
,
0x00
,
0x00
);
FillPicture
(
p_picture
,
STYLE_ALPHA_TRANSPARENT
,
0x00
,
0x00
,
0x00
);
RenderBackground
(
p_region
,
p_line_head
,
p_bbox
,
i_margin
,
p_picture
,
i_text_width
,
ExtractComponents
,
BlendPixel
);
}
else
{
...
...
modules/text_renderer/text_layout.c
View file @
bb9834b5
...
...
@@ -853,7 +853,7 @@ static int LoadGlyphs( filter_t *p_filter, paragraph_t *p_paragraph,
p_bitmaps
->
p_outline
=
0
;
}
if
(
p_filter
->
p_sys
->
p_style
->
i_shadow_alpha
>
0
)
if
(
p_filter
->
p_sys
->
p_style
->
i_shadow_alpha
!=
STYLE_ALPHA_TRANSPARENT
)
p_bitmaps
->
p_shadow
=
p_bitmaps
->
p_outline
?
p_bitmaps
->
p_outline
:
p_bitmaps
->
p_glyph
;
...
...
src/misc/text_style.c
View file @
bb9834b5
...
...
@@ -51,15 +51,15 @@ text_style_t *text_style_Create( int i_defaults )
p_style
->
f_font_relsize
=
STYLE_DEFAULT_REL_FONT_SIZE
;
p_style
->
i_font_size
=
STYLE_DEFAULT_FONT_SIZE
;
p_style
->
i_font_color
=
0xffffff
;
p_style
->
i_font_alpha
=
0xff
;
p_style
->
i_font_alpha
=
STYLE_ALPHA_OPAQUE
;
p_style
->
i_outline_color
=
0x000000
;
p_style
->
i_outline_alpha
=
0xff
;
p_style
->
i_outline_alpha
=
STYLE_ALPHA_OPAQUE
;
p_style
->
i_shadow_color
=
0x808080
;
p_style
->
i_shadow_alpha
=
0xff
;
p_style
->
i_shadow_alpha
=
STYLE_ALPHA_OPAQUE
;
p_style
->
i_background_color
=
0x000000
;
p_style
->
i_background_alpha
=
0xff
;
p_style
->
i_background_alpha
=
STYLE_ALPHA_OPAQUE
;
p_style
->
i_karaoke_background_color
=
0xffffff
;
p_style
->
i_karaoke_background_alpha
=
0xff
;
p_style
->
i_karaoke_background_alpha
=
STYLE_ALPHA_OPAQUE
;
p_style
->
i_outline_width
=
1
;
p_style
->
i_shadow_width
=
0
;
p_style
->
i_spacing
=
-
1
;
...
...
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