Skip to content

Commit

Permalink
hilight -> highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouqueau committed Mar 13, 2024
1 parent 8492d5d commit 721268d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/compositor/visual_manager_2d.h
Expand Up @@ -110,7 +110,7 @@ DrawPath shall always be called after TexturePath*/
void visual_2d_draw_path(GF_VisualManager *visual, GF_Path *path, DrawableContext *ctx, GF_EVGStencil * brush, GF_EVGStencil * pen, GF_TraverseState *tr_state);
/*special texturing extension for text, using a given path (text rectangle) and texture*/
void visual_2d_texture_path_text(GF_VisualManager *visual, DrawableContext *txt_ctx, GF_Path *path, GF_Rect *object_bounds, GF_TextureHandler *txh, GF_TraverseState *tr_state);
/*fill given rect with given color with given ctx transform and clipper (used for text hilighting only)
/*fill given rect with given color with given ctx transform and clipper (used for text highlighting only)
if rc is NULL, fills object bounds*/
void visual_2d_fill_rect(GF_VisualManager *visual, DrawableContext *ctx, GF_Rect *rc, u32 color, u32 strike_color, GF_TraverseState *tr_state);

Expand Down
2 changes: 1 addition & 1 deletion src/compositor/visual_manager_3d.h
Expand Up @@ -290,7 +290,7 @@ void visual_3d_has_inactive_light(GF_VisualManager *visual);

/*set fog*/
void visual_3d_set_fog(GF_VisualManager *visual, const char *type, SFColor color, Fixed density, Fixed visibility);
/*fill given rect with given color (used for text hilighting only) - context shall not be altered*/
/*fill given rect with given color (used for text highlighting only) - context shall not be altered*/
void visual_3d_fill_rect(GF_VisualManager *visual, GF_Rect rc, SFColorRGBA color);

void visual_3d_point_sprite(GF_VisualManager *visual, Drawable *stack, GF_TextureHandler *txh, GF_TraverseState *tr_state);
Expand Down
20 changes: 10 additions & 10 deletions src/filters/dec_ttxt.c
Expand Up @@ -40,7 +40,7 @@
this scene graph is then used as an extra graph by the renderer, and manipulated by the decoder
for any time animation handling.
Translation from text to MPEG-4 scene graph:
* all modifiers (styles, hilight, etc) are unrolled into chunks forming a unique, linear
* all modifiers (styles, highlight, etc) are unrolled into chunks forming a unique, linear
sequence of text data (startChar, endChar) with associated styles & modifs
* chunks are mapped to classic MPEG-4/VRML text
* these chunks are then gathered in a Form node (supported by 2D and 3D renderers), with
Expand All @@ -54,15 +54,15 @@
* text color
* proper alignment (H and V) with horizontal text. Vertical text may not be properly layed out (not fully tested)
* style Records (font, size, fontstyles, and colors change) - any nb per sample supported
* hilighting (static only) with color or reverse video - any nb per sample supported
* highlighting (static only) with color or reverse video - any nb per sample supported
* hypertext links - any nb per sample supported
* blinking - any nb per sample supported
* complete scrolling: in, out, in+out, up, down, right and left directions. All other
modifiers are supported when scrolling
* scroll delay
It does NOT support:
* dynamic hilighting (karaoke)
* dynamic highlighting (karaoke)
* wrap
The decoder only accepts complete timed text units TTU(1). In band reconfig (TTU(5) is not supported,
Expand Down Expand Up @@ -592,8 +592,8 @@ typedef struct
{
u32 start_char, end_char;
GF_StyleRecord *srec;
Bool is_hilight;
u32 hilight_col; /*0 means RV*/
Bool is_highlight;
u32 highlight_col; /*0 means RV*/
GF_TextHyperTextBox *hlink;
Bool has_blink;
/*karaoke not done yet*/
Expand Down Expand Up @@ -682,10 +682,10 @@ static void ttd_new_text_chunk(GF_TTXTDec *ctx, GF_TextSampleDescriptor *tsd, M_
if ((styleFlags & GF_TXT_STYLE_UNDERLINED) || (tc->hlink && tc->hlink->URL)) strcat(szStyle, " UNDERLINED");
if (styleFlags & GF_TXT_STYLE_STRIKETHROUGH) strcat(szStyle, " STRIKETHROUGH");

if (tc->is_hilight) {
if (tc->hilight_col) {
if (tc->is_highlight) {
if (tc->highlight_col) {
char szTxt[50];
sprintf(szTxt, " HIGHLIGHT#%x", tc->hilight_col);
sprintf(szTxt, " HIGHLIGHT#%x", tc->highlight_col);
strcat(szStyle, szTxt);
} else {
strcat(szStyle, " HIGHLIGHT#RV");
Expand Down Expand Up @@ -830,8 +830,8 @@ static void ttd_split_chunks(GF_TextSample *txt, u32 nb_chars, GF_List *chunks,
/*assign mod*/
switch (mod->type) {
case GF_ISOM_BOX_TYPE_HLIT:
tc->is_hilight = GF_TRUE;
if (txt->highlight_color) tc->hilight_col = txt->highlight_color->hil_color;
tc->is_highlight = GF_TRUE;
if (txt->highlight_color) tc->highlight_col = txt->highlight_color->hil_color;
break;
case GF_ISOM_BOX_TYPE_HREF:
tc->hlink = (GF_TextHyperTextBox *) mod;
Expand Down

0 comments on commit 721268d

Please sign in to comment.