]> git.sesse.net Git - mlt/commitdiff
outline text possible (with use of font-outline/font-outline-color)
authorMarco Gittler <g.marco@freenet.de>
Wed, 23 Dec 2009 13:20:30 +0000 (14:20 +0100)
committerMarco Gittler <g.marco@freenet.de>
Wed, 6 Jan 2010 11:08:23 +0000 (12:08 +0100)
src/modules/qimage/kdenlivetitle_wrapper.cpp

index 48d2200b87057b3869320758c9a2bf585fbe1468..1b2e8c8758044b88b1ca8d2fada53b125ac768bb 100755 (executable)
@@ -206,7 +206,20 @@ void loadFromXml( mlt_producer producer, QGraphicsScene *scene, const char *temp
                                        text = text.replace( "%s", replacementText );
                                }
                                QGraphicsTextItem *txt = scene->addText(text, font);
-                               txt->setDefaultTextColor( col );
+                               if (txtProperties.namedItem("font-outline").nodeValue().toDouble()>0.0){
+                                       QTextCursor cursor(txt->document());
+                                       cursor.select(QTextCursor::Document);
+                                       QTextCharFormat format;
+                                       format.setTextOutline(
+                                                       QPen(QColor( stringToColor( txtProperties.namedItem( "font-outline-color" ).nodeValue() ) ),
+                                                       txtProperties.namedItem("font-outline").nodeValue().toDouble())
+                                       );
+                                       format.setForeground(QBrush(col));
+
+                                       cursor.mergeCharFormat(format);
+                               } else {
+                                       txt->setDefaultTextColor( col );
+                               }
                                
                                // Effects
                                if (!txtProperties.namedItem( "typewriter" ).isNull()) {