Skip to content

Commit 20761d8

Browse files
committed
1 parent 799b222 commit 20761d8

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

src/modules/qt/filter_qtext.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,19 @@ static void paint_text(QPainter *painter,
367367
int position,
368368
int length)
369369
{
370-
QPen pen = get_qpen(filter_properties, frame_properties, position, length);
371-
painter->setPen(pen);
370+
// Draw the outline first, and then draw the fill on top of it.
371+
// This avoids the outline encroaching on the text fill.
372+
373+
// Draw the outline if requested
374+
if (mlt_properties_get_int(filter_properties, "outline")) {
375+
QPen pen = get_qpen(filter_properties, frame_properties, position, length);
376+
painter->setPen(pen);
377+
painter->setBrush(Qt::NoBrush); // No brush needed for outline
378+
painter->drawPath(*qpath);
379+
}
380+
381+
// Fill the text area
382+
painter->setPen(Qt::NoPen); // No pen needed for fill
372383
QBrush brush = get_qbrush(filter_properties, frame_properties, position, length);
373384
painter->setBrush(brush);
374385
painter->drawPath(*qpath);

0 commit comments

Comments
 (0)