Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer
On Mon, Jun 8, 2015 at 12:32 AM Maksym Veremeyenko ve...@m1stereo.tv wrote: On 04.06.2015 0:07, Dan Dennedy wrote: On Wed, Jun 3, 2015 at 1:48 PM Maksym Veremeyenko ve...@m1stereo.tv mailto:ve...@m1stereo.tv wrote: On 03.06.2015 23:06, Dan Dennedy wrote: [...] True, it is using pango functions, and those are good enough reasons. I will accept it, but please change property name to rotate unless it supports rotating along other axes. If it does, then rotate_x. one axis rotation... what rotation property name would you prefer? rotate updated patch attached applied. Thanks! -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer
On 04.06.2015 0:07, Dan Dennedy wrote: On Wed, Jun 3, 2015 at 1:48 PM Maksym Veremeyenko ve...@m1stereo.tv mailto:ve...@m1stereo.tv wrote: On 03.06.2015 23:06, Dan Dennedy wrote: [...] True, it is using pango functions, and those are good enough reasons. I will accept it, but please change property name to rotate unless it supports rotating along other axes. If it does, then rotate_x. one axis rotation... what rotation property name would you prefer? rotate updated patch attached -- Maksym Veremeyenko From 81eb56a29be88f258e999153f9ee6f66fba4a60c Mon Sep 17 00:00:00 2001 From: Maksym Veremeyenko ve...@m1.tv Date: Mon, 8 Jun 2015 11:21:25 +0200 Subject: [PATCH] Implement text rotation in pango producer --- src/modules/gtk2/producer_pango.c | 47 +++--- src/modules/gtk2/producer_pango.yml | 10 +++ 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/src/modules/gtk2/producer_pango.c b/src/modules/gtk2/producer_pango.c index c450de5..baa733a 100644 --- a/src/modules/gtk2/producer_pango.c +++ b/src/modules/gtk2/producer_pango.c @@ -80,6 +80,7 @@ struct producer_pango_s int size; int style; int weight; + int rotate; }; static void clean_cached( producer_pango self ) @@ -98,7 +99,7 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int ind static void producer_close( mlt_producer parent ); static void pango_draw_background( GdkPixbuf *pixbuf, rgba_color bg ); static GdkPixbuf *pango_get_pixbuf( const char *markup, const char *text, const char *font, - rgba_color fg, rgba_color bg, rgba_color ol, int pad, int align, char* family, int style, int weight, int size, int outline ); + rgba_color fg, rgba_color bg, rgba_color ol, int pad, int align, char* family, int style, int weight, int size, int outline, int rotate ); static void fill_pixbuf( GdkPixbuf* pixbuf, FT_Bitmap* bitmap, int w, int h, int pad, int align, rgba_color fg, rgba_color bg ); static void fill_pixbuf_with_outline( GdkPixbuf* pixbuf, FT_Bitmap* bitmap, int w, int h, int pad, int align, rgba_color fg, rgba_color bg, rgba_color ol, int outline ); @@ -179,6 +180,7 @@ mlt_producer producer_pango_init( const char *filename ) mlt_properties_set( properties, style, normal ); mlt_properties_set( properties, encoding, UTF-8 ); mlt_properties_set_int( properties, weight, PANGO_WEIGHT_NORMAL ); + mlt_properties_set_int( properties, rotate, 0 ); mlt_properties_set_int( properties, seekable, 1 ); if ( filename == NULL || ( filename ( !strcmp( filename, ) @@ -394,6 +396,7 @@ static void refresh_image( mlt_frame frame, int width, int height ) int style = parse_style( mlt_properties_get( producer_props, style ) ); char *encoding = mlt_properties_get( producer_props, encoding ); int weight = mlt_properties_get_int( producer_props, weight ); + int rotate = mlt_properties_get_int( producer_props, rotate ); int size = mlt_properties_get_int( producer_props, size ); int property_changed = 0; @@ -423,6 +426,7 @@ static void refresh_image( mlt_frame frame, int width, int height ) property_changed = property_changed || ( font this-font strcmp( font, this-font ) ); property_changed = property_changed || ( family this-family strcmp( family, this-family ) ); property_changed = property_changed || ( weight != this-weight ); + property_changed = property_changed || ( rotate != this-rotate ); property_changed = property_changed || ( style != this-style ); property_changed = property_changed || ( size != this-size ); @@ -438,6 +442,7 @@ static void refresh_image( mlt_frame frame, int width, int height ) set_string( this-font, font, NULL ); set_string( this-family, family, Sans ); this-weight = weight; + this-rotate = rotate; this-style = style; this-size = size; } @@ -469,7 +474,7 @@ static void refresh_image( mlt_frame frame, int width, int height ) } // Render the title - pixbuf = pango_get_pixbuf( markup, text, font, fgcolor, bgcolor, olcolor, pad, align, family, style, weight, size, outline ); + pixbuf = pango_get_pixbuf( markup, text, font, fgcolor, bgcolor, olcolor, pad, align, family, style, weight, size, outline, rotate ); if ( pixbuf != NULL ) { @@ -735,11 +740,12 @@ static void pango_draw_background( GdkPixbuf *pixbuf, rgba_color bg ) } } -static GdkPixbuf *pango_get_pixbuf( const char *markup, const char *text, const char *font, rgba_color fg, rgba_color bg, rgba_color ol, int pad, int
Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer
On Wed, Jun 3, 2015 at 9:46 AM Maksym Veremeyenko ve...@m1stereo.tv wrote: On 02.06.2015 22:36, Dan Dennedy wrote: On Tue, Jun 2, 2015 at 11:05 AM Brian Matherly c...@brianmatherly.com mailto:c...@brianmatherly.com wrote: You make a good point. The same result can be achieved by applying the affine transition. Instead of putting the rotation responsibility on the pango producer, why not allow the watermark filter to use the affine transition? Umm, no. melt +hello.txt -attach affine transition.fix_rotate_x=45 filter_watermark is to transition_composite as filter_affine is to transition_affine. I do not want to extend watermark to use affine when filter_affine is so similar: melt +hello.txt -attach affine:noise: transition.fix_rotate_x=45 Neither will I accept adding any more features to the already unwieldy transition_composite. One can use tracks and transitions - possibly encapsulating it within a tractor as a virtual clip - either inline or as distinct MLT XML. Also, one can work to improve affine or core/filter_transition. ...assuming I have decided to reject the idea of rotation within pango. Let me hear Maksym's reaction/argument. my arguments are: - *quality*: basically glyphs rotated at vector level and only then rasterized subpixelly - *CPU usage*: it does not perform any floating point calculation and image scaling. it is basically pango renderer feature True, it is using pango functions, and those are good enough reasons. I will accept it, but please change property name to rotate unless it supports rotating along other axes. If it does, then rotate_x. When are you going to start pushing to a git repo and send pull requests? -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer
On 03.06.2015 23:06, Dan Dennedy wrote: On Wed, Jun 3, 2015 at 9:46 AM Maksym Veremeyenko ve...@m1stereo.tv mailto:ve...@m1stereo.tv wrote: On 02.06.2015 22:36, Dan Dennedy wrote: On Tue, Jun 2, 2015 at 11:05 AM Brian Matherly c...@brianmatherly.com mailto:c...@brianmatherly.com mailto:c...@brianmatherly.com mailto:c...@brianmatherly.com wrote: You make a good point. The same result can be achieved by applying the affine transition. Instead of putting the rotation responsibility on the pango producer, why not allow the watermark filter to use the affine transition? Umm, no. melt +hello.txt -attach affine transition.fix_rotate_x=45 filter_watermark is to transition_composite as filter_affine is to transition_affine. I do not want to extend watermark to use affine when filter_affine is so similar: melt +hello.txt -attach affine:noise: transition.fix_rotate_x=45 Neither will I accept adding any more features to the already unwieldy transition_composite. One can use tracks and transitions - possibly encapsulating it within a tractor as a virtual clip - either inline or as distinct MLT XML. Also, one can work to improve affine or core/filter_transition. ...assuming I have decided to reject the idea of rotation within pango. Let me hear Maksym's reaction/argument. my arguments are: - *quality*: basically glyphs rotated at vector level and only then rasterized subpixelly - *CPU usage*: it does not perform any floating point calculation and image scaling. it is basically pango renderer feature True, it is using pango functions, and those are good enough reasons. I will accept it, but please change property name to rotate unless it supports rotating along other axes. If it does, then rotate_x. one axis rotation... what rotation property name would you prefer? When are you going to start pushing to a git repo and send pull requests? i will provide updated patch in a week -- Maksym Veremeyenko -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer
On Wed, Jun 3, 2015 at 1:48 PM Maksym Veremeyenko ve...@m1stereo.tv wrote: On 03.06.2015 23:06, Dan Dennedy wrote: On Wed, Jun 3, 2015 at 9:46 AM Maksym Veremeyenko ve...@m1stereo.tv mailto:ve...@m1stereo.tv wrote: On 02.06.2015 22:36, Dan Dennedy wrote: On Tue, Jun 2, 2015 at 11:05 AM Brian Matherly c...@brianmatherly.com mailto:c...@brianmatherly.com mailto:c...@brianmatherly.com mailto:c...@brianmatherly.com wrote: You make a good point. The same result can be achieved by applying the affine transition. Instead of putting the rotation responsibility on the pango producer, why not allow the watermark filter to use the affine transition? Umm, no. melt +hello.txt -attach affine transition.fix_rotate_x=45 filter_watermark is to transition_composite as filter_affine is to transition_affine. I do not want to extend watermark to use affine when filter_affine is so similar: melt +hello.txt -attach affine:noise: transition.fix_rotate_x=45 Neither will I accept adding any more features to the already unwieldy transition_composite. One can use tracks and transitions - possibly encapsulating it within a tractor as a virtual clip - either inline or as distinct MLT XML. Also, one can work to improve affine or core/filter_transition. ...assuming I have decided to reject the idea of rotation within pango. Let me hear Maksym's reaction/argument. my arguments are: - *quality*: basically glyphs rotated at vector level and only then rasterized subpixelly - *CPU usage*: it does not perform any floating point calculation and image scaling. it is basically pango renderer feature True, it is using pango functions, and those are good enough reasons. I will accept it, but please change property name to rotate unless it supports rotating along other axes. If it does, then rotate_x. one axis rotation... what rotation property name would you prefer? rotate -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer
12.05.15 10:53, Maksym Veremeyenko написав(ла): Hi, attached patch implement text rotation in pango producer. example of usage: melt \ -v \ -profile square_pal \ /tmp/demo.mp4 \ -consumer sdl \ -filter watermark:pango \ producer.force_apect_ratio=@1/1 \ producer.text=Hi, here! \ producer.family=Arial \ producer.size=32 \ producer.weight=700 \ producer.fgcolour=#FF00 \ producer.bgcolour=#48FF \ producer.rot_angle=48 \ composite.geometry=300/-300:100%x100%:100% \ composite.halign=left \ composite.valign=bottom ping? -- Maksym Veremeyenko -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer
On Tue, Jun 2, 2015 at 11:05 AM Brian Matherly c...@brianmatherly.com wrote: You make a good point. The same result can be achieved by applying the affine transition. Instead of putting the rotation responsibility on the pango producer, why not allow the watermark filter to use the affine transition? Umm, no. melt +hello.txt -attach affine transition.fix_rotate_x=45 filter_watermark is to transition_composite as filter_affine is to transition_affine. I do not want to extend watermark to use affine when filter_affine is so similar: melt +hello.txt -attach affine:noise: transition.fix_rotate_x=45 Neither will I accept adding any more features to the already unwieldy transition_composite. One can use tracks and transitions - possibly encapsulating it within a tractor as a virtual clip - either inline or as distinct MLT XML. Also, one can work to improve affine or core/filter_transition. ...assuming I have decided to reject the idea of rotation within pango. Let me hear Maksym's reaction/argument. -- *From:* Dan Dennedy d...@dennedy.org *To:* Brian Matherly c...@brianmatherly.com; Maksym Veremeyenko ve...@m1stereo.tv; mlt-devel@lists.sourceforge.net mlt-devel@lists.sourceforge.net *Sent:* Tuesday, June 2, 2015 11:24 AM *Subject:* Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer On Tue, Jun 2, 2015 at 5:49 AM Brian Matherly c...@brianmatherly.com wrote: Personally, I would like to see this implemented in the qtext producer also since we try to keep qtext and pango producers in sync. I agree, but I do not like to impose that requirement on a contributor. Rather, I impose that obligation on me (or whoever approves and merges). That is part of the reason why I did not merge this yet - due to priorities and time. Therefore, if the contributor does both it certainly helps. Also, we have other filters that rotate. Yeah, I know, combining these filters is not optimal for efficiency reasons - especially real-time. But, now this filter is doing affine transform. Will it expand to do all transforms? Will it start to integrate graphics? Does it grow into something approaching kidenlivetitle? Where does it end? Where do we say, no, we just want to keep this code simple for maintenance reasons; use webvfx, image sequence, or video with alpha for more? Also, I would suggest angle or rotation instead of rot_angle. Or rotate. Also, the YAML should include unit: degrees instead of putting that in the description, but that is a little nitpicky. ~BM -- *From:* Maksym Veremeyenko ve...@m1stereo.tv *To:* mlt-devel@lists.sourceforge.net *Cc:* Dan Dennedy d...@dennedy.org *Sent:* Tuesday, June 2, 2015 4:44 AM *Subject:* Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer 12.05.15 10:53, Maksym Veremeyenko написав(ла): Hi, attached patch implement text rotation in pango producer. example of usage: melt \ -v \ -profile square_pal \ /tmp/demo.mp4 \ -consumer sdl \ -filter watermark:pango \ producer.force_apect_ratio=@1/1 \ producer.text=Hi, here! \ producer.family=Arial \ producer.size=32 \ producer.weight=700 \ producer.fgcolour=#FF00 \ producer.bgcolour=#48FF \ producer.rot_angle=48 \ composite.geometry=300/-300:100%x100%:100% \ composite.halign=left \ composite.valign=bottom ping? -- Maksym Veremeyenko -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer
You make a good point. The same result can be achieved by applying the affine transition. Instead of putting the rotation responsibility on the pango producer, why not allow the watermark filter to use the affine transition? From: Dan Dennedy d...@dennedy.org To: Brian Matherly c...@brianmatherly.com; Maksym Veremeyenko ve...@m1stereo.tv; mlt-devel@lists.sourceforge.net mlt-devel@lists.sourceforge.net Sent: Tuesday, June 2, 2015 11:24 AM Subject: Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer On Tue, Jun 2, 2015 at 5:49 AM Brian Matherly c...@brianmatherly.com wrote: Personally, I would like to see this implemented in the qtext producer also since we try to keep qtext and pango producers in sync. I agree, but I do not like to impose that requirement on a contributor. Rather, I impose that obligation on me (or whoever approves and merges). That is part of the reason why I did not merge this yet - due to priorities and time. Therefore, if the contributor does both it certainly helps.Also, we have other filters that rotate. Yeah, I know, combining these filters is not optimal for efficiency reasons - especially real-time. But, now this filter is doing affine transform. Will it expand to do all transforms? Will it start to integrate graphics? Does it grow into something approaching kidenlivetitle? Where does it end? Where do we say, no, we just want to keep this code simple for maintenance reasons; use webvfx, image sequence, or video with alpha for more? Also, I would suggest angle or rotation instead of rot_angle. Or rotate. Also, the YAML should include unit: degrees instead of putting that in the description, but that is a little nitpicky. ~BM From: Maksym Veremeyenko ve...@m1stereo.tv To: mlt-devel@lists.sourceforge.net Cc: Dan Dennedy d...@dennedy.org Sent: Tuesday, June 2, 2015 4:44 AM Subject: Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer 12.05.15 10:53, Maksym Veremeyenko написав(ла): Hi, attached patch implement text rotation in pango producer. example of usage: melt \ -v \ -profile square_pal \ /tmp/demo.mp4 \ -consumer sdl \ -filter watermark:pango \ producer.force_apect_ratio=@1/1 \ producer.text=Hi, here! \ producer.family=Arial \ producer.size=32 \ producer.weight=700 \ producer.fgcolour=#FF00 \ producer.bgcolour=#48FF \ producer.rot_angle=48 \ composite.geometry=300/-300:100%x100%:100% \ composite.halign=left \ composite.valign=bottom ping? -- Maksym Veremeyenko -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer
Personally, I would like to see this implemented in the qtext producer also since we try to keep qtext and pango producers in sync. Also, I would suggest angle or rotation instead of rot_angle. ~BM From: Maksym Veremeyenko ve...@m1stereo.tv To: mlt-devel@lists.sourceforge.net Cc: Dan Dennedy d...@dennedy.org Sent: Tuesday, June 2, 2015 4:44 AM Subject: Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer 12.05.15 10:53, Maksym Veremeyenko написав(ла): Hi, attached patch implement text rotation in pango producer. example of usage: melt \ -v \ -profile square_pal \ /tmp/demo.mp4 \ -consumer sdl \ -filter watermark:pango \ producer.force_apect_ratio=@1/1 \ producer.text=Hi, here! \ producer.family=Arial \ producer.size=32 \ producer.weight=700 \ producer.fgcolour=#FF00 \ producer.bgcolour=#48FF \ producer.rot_angle=48 \ composite.geometry=300/-300:100%x100%:100% \ composite.halign=left \ composite.valign=bottom ping? -- Maksym Veremeyenko -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer
On Tue, Jun 2, 2015 at 5:49 AM Brian Matherly c...@brianmatherly.com wrote: Personally, I would like to see this implemented in the qtext producer also since we try to keep qtext and pango producers in sync. I agree, but I do not like to impose that requirement on a contributor. Rather, I impose that obligation on me (or whoever approves and merges). That is part of the reason why I did not merge this yet - due to priorities and time. Therefore, if the contributor does both it certainly helps. Also, we have other filters that rotate. Yeah, I know, combining these filters is not optimal for efficiency reasons - especially real-time. But, now this filter is doing affine transform. Will it expand to do all transforms? Will it start to integrate graphics? Does it grow into something approaching kidenlivetitle? Where does it end? Where do we say, no, we just want to keep this code simple for maintenance reasons; use webvfx, image sequence, or video with alpha for more? Also, I would suggest angle or rotation instead of rot_angle. Or rotate. Also, the YAML should include unit: degrees instead of putting that in the description, but that is a little nitpicky. ~BM -- *From:* Maksym Veremeyenko ve...@m1stereo.tv *To:* mlt-devel@lists.sourceforge.net *Cc:* Dan Dennedy d...@dennedy.org *Sent:* Tuesday, June 2, 2015 4:44 AM *Subject:* Re: [Mlt-devel] [PATCH] Implement text rotation in pango producer 12.05.15 10:53, Maksym Veremeyenko написав(ла): Hi, attached patch implement text rotation in pango producer. example of usage: melt \ -v \ -profile square_pal \ /tmp/demo.mp4 \ -consumer sdl \ -filter watermark:pango \ producer.force_apect_ratio=@1/1 \ producer.text=Hi, here! \ producer.family=Arial \ producer.size=32 \ producer.weight=700 \ producer.fgcolour=#FF00 \ producer.bgcolour=#48FF \ producer.rot_angle=48 \ composite.geometry=300/-300:100%x100%:100% \ composite.halign=left \ composite.valign=bottom ping? -- Maksym Veremeyenko -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel -- ___ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel
[Mlt-devel] [PATCH] Implement text rotation in pango producer
Hi, attached patch implement text rotation in pango producer. example of usage: melt \ -v \ -profile square_pal \ /tmp/demo.mp4 \ -consumer sdl \ -filter watermark:pango \ producer.force_apect_ratio=@1/1 \ producer.text=Hi, here! \ producer.family=Arial \ producer.size=32 \ producer.weight=700 \ producer.fgcolour=#FF00 \ producer.bgcolour=#48FF \ producer.rot_angle=48 \ composite.geometry=300/-300:100%x100%:100% \ composite.halign=left \ composite.valign=bottom -- Maksym Veremeyenko From cd4dab4903761af2902a9cad6aa210a86e09af2b Mon Sep 17 00:00:00 2001 From: Maksym Veremeyenko ve...@m1.tv Date: Sun, 10 May 2015 19:21:51 +0200 Subject: [PATCH] Implement text rotation in pango producer --- src/modules/gtk2/producer_pango.c | 47 +++--- src/modules/gtk2/producer_pango.yml | 10 +++ 2 files changed, 52 insertions(+), 5 deletions(-) diff --git a/src/modules/gtk2/producer_pango.c b/src/modules/gtk2/producer_pango.c index c450de5..d6f5c68 100644 --- a/src/modules/gtk2/producer_pango.c +++ b/src/modules/gtk2/producer_pango.c @@ -80,6 +80,7 @@ struct producer_pango_s int size; int style; int weight; + int rot_angle; }; static void clean_cached( producer_pango self ) @@ -98,7 +99,7 @@ static int producer_get_frame( mlt_producer parent, mlt_frame_ptr frame, int ind static void producer_close( mlt_producer parent ); static void pango_draw_background( GdkPixbuf *pixbuf, rgba_color bg ); static GdkPixbuf *pango_get_pixbuf( const char *markup, const char *text, const char *font, - rgba_color fg, rgba_color bg, rgba_color ol, int pad, int align, char* family, int style, int weight, int size, int outline ); + rgba_color fg, rgba_color bg, rgba_color ol, int pad, int align, char* family, int style, int weight, int size, int outline, int rot_angle ); static void fill_pixbuf( GdkPixbuf* pixbuf, FT_Bitmap* bitmap, int w, int h, int pad, int align, rgba_color fg, rgba_color bg ); static void fill_pixbuf_with_outline( GdkPixbuf* pixbuf, FT_Bitmap* bitmap, int w, int h, int pad, int align, rgba_color fg, rgba_color bg, rgba_color ol, int outline ); @@ -179,6 +180,7 @@ mlt_producer producer_pango_init( const char *filename ) mlt_properties_set( properties, style, normal ); mlt_properties_set( properties, encoding, UTF-8 ); mlt_properties_set_int( properties, weight, PANGO_WEIGHT_NORMAL ); + mlt_properties_set_int( properties, rot_angle, 0 ); mlt_properties_set_int( properties, seekable, 1 ); if ( filename == NULL || ( filename ( !strcmp( filename, ) @@ -394,6 +396,7 @@ static void refresh_image( mlt_frame frame, int width, int height ) int style = parse_style( mlt_properties_get( producer_props, style ) ); char *encoding = mlt_properties_get( producer_props, encoding ); int weight = mlt_properties_get_int( producer_props, weight ); + int rot_angle = mlt_properties_get_int( producer_props, rot_angle ); int size = mlt_properties_get_int( producer_props, size ); int property_changed = 0; @@ -423,6 +426,7 @@ static void refresh_image( mlt_frame frame, int width, int height ) property_changed = property_changed || ( font this-font strcmp( font, this-font ) ); property_changed = property_changed || ( family this-family strcmp( family, this-family ) ); property_changed = property_changed || ( weight != this-weight ); + property_changed = property_changed || ( rot_angle != this-rot_angle ); property_changed = property_changed || ( style != this-style ); property_changed = property_changed || ( size != this-size ); @@ -438,6 +442,7 @@ static void refresh_image( mlt_frame frame, int width, int height ) set_string( this-font, font, NULL ); set_string( this-family, family, Sans ); this-weight = weight; + this-rot_angle = rot_angle; this-style = style; this-size = size; } @@ -469,7 +474,7 @@ static void refresh_image( mlt_frame frame, int width, int height ) } // Render the title - pixbuf = pango_get_pixbuf( markup, text, font, fgcolor, bgcolor, olcolor, pad, align, family, style, weight, size, outline ); + pixbuf = pango_get_pixbuf( markup, text, font, fgcolor, bgcolor, olcolor, pad, align, family, style, weight, size, outline, rot_angle ); if ( pixbuf != NULL ) { @@ -735,11 +740,12 @@ static void pango_draw_background( GdkPixbuf *pixbuf, rgba_color bg ) } } -static GdkPixbuf *pango_get_pixbuf( const char *markup, const char *text, const char *font, rgba_color fg, rgba_color bg, rgba_color ol, int pad, int align, char* family, int style, int weight, int size, int outline ) +static GdkPixbuf *pango_get_pixbuf( const char *markup, const char *text, const char *font, rgba_color fg, rgba_color bg, rgba_color ol, int pad, int align, char* family, int style, int weight, int size, int outline, int rot_angle ) { PangoContext