From 182febe5b75de0f1b569a404140617c405a5e417 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Fri, 8 Feb 2013 02:15:16 -0600 Subject: [PATCH] Fixed conditional compile flag for black magic, and improved the quality of the TextReader font rendering. --- include/OpenShot.h | 2 +- src/CMakeLists.txt | 2 +- src/TextReader.cpp | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/OpenShot.h b/include/OpenShot.h index d00b1923..cd684ebe 100644 --- a/include/OpenShot.h +++ b/include/OpenShot.h @@ -30,7 +30,7 @@ #include "Cache.h" #include "Clip.h" #include "Coordinate.h" -#ifndef OPENSHOT_H +#ifdef USE_BLACKMAGIC #include "DecklinkCapture.h" #endif #include "DummyReader.h" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 474746dc..6bbf8a89 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,7 +31,7 @@ include_directories(${SDL_INCLUDE_DIR}) FIND_PACKAGE(BlackMagic) IF (BLACKMAGIC_FOUND) - # Include SDL headers (needed for compile) + # Include headers (needed for compile) include_directories(${BLACKMAGIC_INCLUDE_DIR}) # define a global var (used in the C++) diff --git a/src/TextReader.cpp b/src/TextReader.cpp index 7ee37748..aeb279cb 100644 --- a/src/TextReader.cpp +++ b/src/TextReader.cpp @@ -3,7 +3,7 @@ using namespace openshot; TextReader::TextReader(int width, int height, int x_offset, int y_offset, string text, string font, double size, string text_color, string background_color) -: width(width), height(height), x_offset(x_offset), y_offset(y_offset), text(text), size(size), text_color(text_color), background_color(background_color), is_open(false) +: width(width), height(height), x_offset(x_offset), y_offset(y_offset), text(text), font(font), size(size), text_color(text_color), background_color(background_color), is_open(false) { // Init FileInfo struct (clear all values) InitFileInfo(); @@ -26,7 +26,8 @@ void TextReader::Open() image->backgroundColor(Magick::Color("none")); // Set stroke properties - lines.push_back(Magick::DrawableStrokeColor(text_color)); + lines.push_back(Magick::DrawableStrokeColor(Magick::Color("none"))); + lines.push_back(Magick::DrawableStrokeWidth(0.0)); lines.push_back(Magick::DrawableFillColor(text_color)); lines.push_back(Magick::DrawableFont(font)); lines.push_back(Magick::DrawablePointSize(size));