LiVES  3.2.0
Functions
pangotext.c File Reference
#include "main.h"
#include "pangotext.h"
#include "effects-weed.h"
#include <pango/pangocairo.h>

Go to the source code of this file.

Functions

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)
 
char ** get_font_list (void)
 
LingoLayout * render_text_to_cr (LiVESWidget *widget, lives_painter_t *cr, const char *text, const char *fontname, double size, lives_text_mode_t mode, lives_colRGBA64_t *fg, lives_colRGBA64_t *bg, boolean center, boolean rising, double *top, int *offs_x, int dwidth, int *dheight)
 
LIVES_GLOBAL_INLINE 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)
 
boolean get_subt_text (lives_clip_t *sfile, double xtime)
 
void subtitles_free (lives_clip_t *sfile)
 
boolean subtitles_init (lives_clip_t *sfile, char *fname, lives_subtitle_type_t subtype)
 
boolean save_srt_subtitles (lives_clip_t *sfile, double start_time, double end_time, double offset_time, const char *filename)
 
boolean save_sub_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)
 

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()

LIVES_GLOBAL_INLINE 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 *  cr,
const char *  text,
const char *  fontname,
double  size,
lives_text_mode_t  mode,
lives_colRGBA64_t fg,
lives_colRGBA64_t bg,
boolean  center,
boolean  rising,
double *  top,
int *  offs_x,
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  subtype 
)

Definition at line 996 of file pangotext.c.

Referenced by on_load_subs_activate(), and reload_subs().