LiVES  3.2.0
Data Structures | Macros | Typedefs | Enumerations | Functions
pangotext.h File Reference

Go to the source code of this file.

Data Structures

struct  lives_subtitle_style_t
 
struct  lives_subtitle_t
 
struct  lives_subtitles_t
 

Macros

#define SUB_OPACITY   20480
 
#define SRT_DEF_CHARSET   "Windows-1252"
 subtitles More...
 
#define LIVES_CHARSET_UTF8   "UTF-8"
 

Typedefs

typedef struct _lives_subtitle_t xlives_subtitle_t
 
typedef struct _lives_clip_t lives_clip_t
 

Enumerations

enum  lives_subtitle_type_t { SUBTITLE_TYPE_NONE = 0, SUBTITLE_TYPE_SRT, SUBTITLE_TYPE_SUB }
 
enum  lives_text_mode_t { LIVES_TEXT_MODE_FOREGROUND_ONLY, LIVES_TEXT_MODE_FOREGROUND_AND_BACKGROUND, LIVES_TEXT_MODE_BACKGROUND_ONLY, LIVES_TEXT_MODE_PRECALCULATE }
 

Functions

char ** get_font_list (void)
 
weed_plant_t * render_text_overlay (weed_layer_t *layer, const char *text)
 
weed_plant_t * render_text_to_layer (weed_layer_t *layer, const char *text, const char *fontname, double size, lives_text_mode_t mode, lives_colRGBA64_t *fg_col, lives_colRGBA64_t *bg_col, boolean center, boolean rising, double top)
 
LingoLayout * render_text_to_cr (LiVESWidget *widget, lives_painter_t *, const char *text, const char *fontname, double size, lives_text_mode_t mode, lives_colRGBA64_t *fg_col, lives_colRGBA64_t *bg_col, boolean center, boolean rising, double *top, int *start, int dwidth, int *dheight)
 
void layout_to_lives_painter (LingoLayout *layout, lives_painter_t *cr, lives_text_mode_t mode, lives_colRGBA64_t *fg, lives_colRGBA64_t *bg, int dwidth, int dheight, double x_bg, double y_bg, double x_text, double y_text)
 
LingoLayout * layout_nth_message_at_bottom (int n, int width, int height, LiVESWidget *widget, int *linecount)
 
boolean subtitles_init (lives_clip_t *sfile, char *fname, lives_subtitle_type_t)
 
void subtitles_free (lives_clip_t *sfile)
 
boolean get_subt_text (lives_clip_t *sfile, double xtime)
 
boolean save_sub_subtitles (lives_clip_t *sfile, double start_time, double end_time, double offset_time, const char *filename)
 
boolean save_srt_subtitles (lives_clip_t *sfile, double start_time, double end_time, double offset_time, const char *filename)
 
boolean lives_parse_font_string (const char *string, char **font, int *size, char **stretch, char **style, char **weight)
 

Macro Definition Documentation

◆ LIVES_CHARSET_UTF8

#define LIVES_CHARSET_UTF8   "UTF-8"

Definition at line 76 of file pangotext.h.

◆ SRT_DEF_CHARSET

#define SRT_DEF_CHARSET   "Windows-1252"

subtitles

Definition at line 75 of file pangotext.h.

◆ SUB_OPACITY

#define SUB_OPACITY   20480

Definition at line 13 of file pangotext.h.

Typedef Documentation

◆ lives_clip_t

typedef struct _lives_clip_t lives_clip_t

Definition at line 71 of file pangotext.h.

◆ xlives_subtitle_t

typedef struct _lives_subtitle_t xlives_subtitle_t

Definition at line 1 of file pangotext.h.

Enumeration Type Documentation

◆ lives_subtitle_type_t

Enumerator
SUBTITLE_TYPE_NONE 
SUBTITLE_TYPE_SRT 
SUBTITLE_TYPE_SUB 

Definition at line 15 of file pangotext.h.

◆ lives_text_mode_t

Enumerator
LIVES_TEXT_MODE_FOREGROUND_ONLY 
LIVES_TEXT_MODE_FOREGROUND_AND_BACKGROUND 
LIVES_TEXT_MODE_BACKGROUND_ONLY 
LIVES_TEXT_MODE_PRECALCULATE 

Definition at line 49 of file pangotext.h.

Function Documentation

◆ get_font_list()

char** get_font_list ( void  )

Definition at line 416 of file pangotext.c.

◆ get_subt_text()

boolean get_subt_text ( lives_clip_t sfile,
double  xtime 
)

Definition at line 930 of file pangotext.c.

Referenced by save_srt_subtitles(), and save_sub_subtitles().

◆ layout_nth_message_at_bottom()

LingoLayout* layout_nth_message_at_bottom ( int  n,
int  width,
int  height,
LiVESWidget *  widget,
int *  linecount 
)

TODO ****

height too small; prepend more text

Definition at line 193 of file pangotext.c.

◆ layout_to_lives_painter()

void layout_to_lives_painter ( LingoLayout *  layout,
lives_painter_t *  cr,
lives_text_mode_t  mode,
lives_colRGBA64_t fg,
lives_colRGBA64_t bg,
int  dwidth,
int  dheight,
double  x_bg,
double  y_bg,
double  x_text,
double  y_text 
)

Definition at line 165 of file pangotext.c.

◆ lives_parse_font_string()

boolean lives_parse_font_string ( const char *  string,
char **  font,
int *  size,
char **  stretch,
char **  style,
char **  weight 
)

Definition at line 1182 of file pangotext.c.

◆ render_text_overlay()

weed_plant_t* render_text_overlay ( weed_layer_t layer,
const char *  text 
)

Definition at line 543 of file pangotext.c.

◆ render_text_to_cr()

LingoLayout* render_text_to_cr ( LiVESWidget *  widget,
lives_painter_t *  ,
const char *  text,
const char *  fontname,
double  size,
lives_text_mode_t  mode,
lives_colRGBA64_t fg_col,
lives_colRGBA64_t bg_col,
boolean  center,
boolean  rising,
double *  top,
int *  start,
int  dwidth,
int *  dheight 
)

may cause text to wrap, so call this again

Definition at line 468 of file pangotext.c.

◆ render_text_to_layer()

weed_plant_t* render_text_to_layer ( weed_layer_t layer,
const char *  text,
const char *  fontname,
double  size,
lives_text_mode_t  mode,
lives_colRGBA64_t fg_col,
lives_colRGBA64_t bg_col,
boolean  center,
boolean  rising,
double  top 
)

if possible just render the slice which contains the text

make sure our slice isnt freed, since it is actually part of the image which we will overwrite

< error occurred

Definition at line 570 of file pangotext.c.

Referenced by render_text_overlay().

◆ save_srt_subtitles()

boolean save_srt_subtitles ( lives_clip_t sfile,
double  start_time,
double  end_time,
double  offset_time,
const char *  filename 
)

Definition at line 1039 of file pangotext.c.

◆ save_sub_subtitles()

boolean save_sub_subtitles ( lives_clip_t sfile,
double  start_time,
double  end_time,
double  offset_time,
const char *  filename 
)

Definition at line 1101 of file pangotext.c.

◆ subtitles_free()

void subtitles_free ( lives_clip_t sfile)

◆ subtitles_init()

boolean subtitles_init ( lives_clip_t sfile,
char *  fname,
lives_subtitle_type_t   
)

Definition at line 996 of file pangotext.c.

Referenced by on_load_subs_activate(), and reload_subs().