From 1e11b89d04d85090c0bba192dd550752f6b6593c Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 13 Sep 2017 11:08:51 +0100 Subject: [PATCH] Added --shadow-* command line variants to provide full control over the position of the text shadow --- examples/osgfont/osgfont.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/examples/osgfont/osgfont.cpp b/examples/osgfont/osgfont.cpp index 3c3fd6128..6ccff4f47 100644 --- a/examples/osgfont/osgfont.cpp +++ b/examples/osgfont/osgfont.cpp @@ -124,6 +124,16 @@ struct TextSettings if (arguments.read("--outline")) backdropType = osgText::Text::OUTLINE; if (arguments.read("--shadow")) backdropType = osgText::Text::DROP_SHADOW_BOTTOM_RIGHT; + if (arguments.read("--shadow-br")) backdropType = osgText::Text::DROP_SHADOW_BOTTOM_RIGHT; + if (arguments.read("--shadow-cr")) backdropType = osgText::Text::DROP_SHADOW_CENTER_RIGHT; + if (arguments.read("--shadow-tr")) backdropType = osgText::Text::DROP_SHADOW_TOP_RIGHT; + if (arguments.read("--shadow-bc")) backdropType = osgText::Text::DROP_SHADOW_BOTTOM_CENTER; + if (arguments.read("--shadow-tc")) backdropType = osgText::Text::DROP_SHADOW_TOP_CENTER; + if (arguments.read("--shadow-bl")) backdropType = osgText::Text::DROP_SHADOW_BOTTOM_LEFT; + if (arguments.read("--shadow-cl")) backdropType = osgText::Text::DROP_SHADOW_CENTER_LEFT; + if (arguments.read("--shadow-tl")) backdropType = osgText::Text::DROP_SHADOW_TOP_LEFT; + + float offset; if (arguments.read("--offset", offset)) backdropOffset.set(offset, offset);