Implement pangotext.c functions

Registered by salsaman on 2010-06-21

Add new files src/pangotext.c and src/pangotext.h. Add these files to src/Makefile.am and po/POTFILES.in

In pangotext.c, #include at least "support.h" and "main.h", "colourspace.h" and (for now) plugins.h

create various new functions:

char **get_font_list(void) - return a NULL terminated array of fonts

gboolean render_text_to_layer(weed_plant_t *layer, const char *text, const char *fontname, double size, lives_text_mode_t mode, lives_colRGBA32_t fg_col, lives_colRGBA32_t bg_col, gboolean center, gboolean rising, double top);

You will need to use some functions from colourspace.c

lives_text_mode_t should be defined in pangotext.h, like this:

typedef enum {
  LIVES_TEXT_MODE_FOREGROUND_ONLY,
  LIVES_TEXT_MODE_FOREGROUND_AND_BACKGROUND,
  LIVES_TEXT_MODE_BACKGROUND_ONLY
} lives_textmode_t;

- should work identically to the plugin scribbler function (except we have a layer instead of a channel). If layer "pixel_data" is NULL, create it and act like the generator version of the plugin. Otherwise act like the effect version. Return FALSE on error and TRUE on success.

- convert the layer palette to WEED_PALETTE_RGB24, unless the palette is BGR24 or BGRA32 (then convert it to BGR24)

char *get_srt_text(int fd, double xtime) - pull text from .srt file for time xtime (seconds) and return it

(see: http://en.wikipedia.org/wiki/SubRip for .srt file format)

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
salsaman
Direction:
Needs approval
Assignee:
Aleksej Penkov
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.