summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMahmoud Badri <mahmoud.badri@qt.io>2019-05-16 14:20:18 +0300
committerMahmoud Badri <mahmoud.badri@qt.io>2019-05-16 13:25:20 +0000
commit09b3156579460b5d1b30ab6b17bd26b8a2f04c08 (patch)
tree83587b7a355e0b1e528b750b665e4fce5f7fcd91
parent276d7d0f33cc7befb7337a30cfd4e3f9ce3651b2 (diff)
Increment UIP version
- increment UIP version and show a warning if a UIP version is lower - remove 3 obsolete text shadow props - small update to checking for material container in the timeline - few cleanups Task-number: QT3DS-3366 Task-number: QT3DS-2903 Change-Id: Ib4d8c33e786001d0e5a18037a52303449630adf5 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--examples/studio3d/SampleProject/presentations/SampleProject.uip2
-rw-r--r--src/Authoring/Client/Code/Core/Doc/Doc.cpp26
-rw-r--r--src/Authoring/Client/Code/Core/Doc/Doc.h2
-rw-r--r--src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.cpp3
-rw-r--r--src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.h3
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp13
-rw-r--r--src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp4
-rw-r--r--src/Authoring/Studio/Render/StudioRendererTranslation.cpp3
-rw-r--r--src/Runtime/Source/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp3
-rw-r--r--src/Runtime/Source/runtime/Qt3DSAttributeHashes.cpp3
-rw-r--r--src/Runtime/Source/runtime/Qt3DSAttributeHashes.h3
-rw-r--r--src/Runtime/Source/runtime/Qt3DSAttributeHashes.txt3
-rw-r--r--src/Runtime/Source/runtimerender/Qt3DSDistanceFieldRenderer.cpp2
-rw-r--r--src/Runtime/Source/runtimerender/Qt3DSQtTextRenderer.cpp31
-rw-r--r--src/Runtime/Source/runtimerender/Qt3DSRenderTextTextureCache.cpp7
-rw-r--r--src/Runtime/Source/runtimerender/Qt3DSRenderTextTypes.h5
-rw-r--r--src/Runtime/Source/runtimerender/Qt3DSRenderUIPLoader.cpp3
-rw-r--r--src/Runtime/Source/runtimerender/Qt3DSRenderUIPSharedTranslation.h3
-rw-r--r--src/Runtime/Source/runtimerender/graphobjects/Qt3DSRenderText.cpp5
-rw-r--r--src/Runtime/res/DataModelMetadata/en-us/MetaData.xml4
20 files changed, 32 insertions, 96 deletions
diff --git a/examples/studio3d/SampleProject/presentations/SampleProject.uip b/examples/studio3d/SampleProject/presentations/SampleProject.uip
index db639be5..bd0b3e70 100644
--- a/examples/studio3d/SampleProject/presentations/SampleProject.uip
+++ b/examples/studio3d/SampleProject/presentations/SampleProject.uip
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<UIP version="5" >
+<UIP version="6" >
<Project >
<ProjectSettings author="" company="The Qt Company" presentationWidth="1280" presentationHeight="480" maintainAspect="False" preferKtx="False" >
<CustomColors count="16" >#dc0032 #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors>
diff --git a/src/Authoring/Client/Code/Core/Doc/Doc.cpp b/src/Authoring/Client/Code/Core/Doc/Doc.cpp
index 0a32a3c2..a8000182 100644
--- a/src/Authoring/Client/Code/Core/Doc/Doc.cpp
+++ b/src/Authoring/Client/Code/Core/Doc/Doc.cpp
@@ -90,7 +90,7 @@ using std::shared_ptr;
//==============================================================================
// Constants
//==============================================================================
-const long STUDIO_FILE_VERSION = 5;
+const long STUDIO_FILE_VERSION = 6;
const long STUDIO_LAST_SUPPORTED_FILE_VERSION = 1;
IMPLEMENT_OBJECT_COUNTER(CDoc)
@@ -1582,9 +1582,9 @@ void CDoc::SetDirectoryWatchingSystem(
m_DirectoryWatchingSystem = inSystem;
}
-Q3DStudio::IDirectoryWatchingSystem *CDoc::GetDirectoryWatchingSystem()
+Q3DStudio::IDirectoryWatchingSystem *CDoc::GetDirectoryWatchingSystem() const
{
- return m_DirectoryWatchingSystem ? m_DirectoryWatchingSystem.get() : NULL;
+ return m_DirectoryWatchingSystem ? m_DirectoryWatchingSystem.get() : nullptr;
}
bool CDoc::SetDocumentPath(const QString &inDocumentPath)
@@ -2237,6 +2237,14 @@ void CDoc::LoadPresentationFile(CBufferedInputStream *inInputStream)
m_StudioSystem->GetFullSystem()->GetSignalSender()->SendActiveSlide(theMasterSlide, 1,
theChildSlide);
+ if (uipVersion < 6) {
+ // uipVersion 6 introduced vec4 colors
+ g_StudioApp.GetDialogs()->DisplayMessageBox(
+ tr("Old Presentation Version"),
+ tr("Some custom materials, effects, and behaviors may not work correctly."),
+ Qt3DSMessageBox::ICON_WARNING, false);
+ }
+
if (uipVersion == 3) {
bool cleaned = m_SceneEditor->CleanUpMeshes();
QTimer::singleShot(0, [=](){
@@ -2469,7 +2477,7 @@ DoCreateDOMReader(qt3ds::foundation::IInStream &inStream,
std::shared_ptr<IDOMFactory> theFactory(IDOMFactory::CreateDOMFactory(theStringTable));
SDOMElement *theElement = CDOMSerializer::Read(*theFactory, inStream);
outVersion = 0;
- if (theElement != NULL) {
+ if (theElement) {
std::shared_ptr<IDOMReader> retval =
IDOMReader::CreateDOMReader(*theElement, theStringTable, theFactory);
@@ -2587,11 +2595,9 @@ void CDoc::SavePresentationFile(CBufferedOutputStream *inOutputStream)
m_DocumentBufferCache->GetImageBuffers(theImageBuffers);
// Remove buffers that aren't in the map.
- erase_if(
- theImageBuffers,
- SBufferFilter(sourcePathToInstanceMap,
- *m_StudioSystem->GetFullSystem()->GetCoreSystem()->GetStringTablePtr()));
- if (theImageBuffers.empty() == false) {
+ erase_if(theImageBuffers, SBufferFilter(sourcePathToInstanceMap,
+ *m_StudioSystem->GetFullSystem()->GetCoreSystem()->GetStringTablePtr()));
+ if (!theImageBuffers.empty()) {
// Ensure the source paths are always written out in the same order to keep source
// control reasonable
std::sort(theImageBuffers.begin(), theImageBuffers.end(),
@@ -2864,7 +2870,7 @@ qt3dsdm::Qt3DSDMInstanceHandle CDoc::GetTopmostGroup(qt3dsdm::Qt3DSDMInstanceHan
void CDoc::ScheduleRemoveImageInstances(qt3dsdm::Qt3DSDMInstanceHandle inInstance,
CCmdBatch * /*outBatch*/)
{
- IterateImageInstances(inInstance, NULL);
+ IterateImageInstances(inInstance, nullptr);
}
//==============================================================================
diff --git a/src/Authoring/Client/Code/Core/Doc/Doc.h b/src/Authoring/Client/Code/Core/Doc/Doc.h
index 54e0e3c1..1a82ae02 100644
--- a/src/Authoring/Client/Code/Core/Doc/Doc.h
+++ b/src/Authoring/Client/Code/Core/Doc/Doc.h
@@ -227,7 +227,7 @@ public:
std::shared_ptr<Q3DStudio::IMoveRenameHandler> getMoveRenameHandler();
// The system may be null in the case where we are running without a UI.
- Q3DStudio::IDirectoryWatchingSystem *GetDirectoryWatchingSystem();
+ Q3DStudio::IDirectoryWatchingSystem *GetDirectoryWatchingSystem() const;
bool SetDocumentPath(const QString &inFile);
QString GetDocumentPath() const;
void setPresentationId(const QString &id);
diff --git a/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.cpp b/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.cpp
index 41aa3365..2bd89418 100644
--- a/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.cpp
+++ b/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.cpp
@@ -223,11 +223,8 @@ struct DataConstructor<SObjectRefType>
#define QT3DS_WCHAR_T_tracking L"tracking"
#define QT3DS_WCHAR_T_dropshadow L"dropshadow"
#define QT3DS_WCHAR_T_dropshadowstrength L"dropshadowstrength"
-#define QT3DS_WCHAR_T_dropshadowoffset L"dropshadowoffset" // To be removed in 2.x (when UIP version is next updated)
#define QT3DS_WCHAR_T_dropshadowoffsetx L"dropshadowoffsetx"
#define QT3DS_WCHAR_T_dropshadowoffsety L"dropshadowoffsety"
-#define QT3DS_WCHAR_T_dropshadowhorzalign L"dropshadowhorzalign" // To be removed in 2.x (when UIP version is next updated)
-#define QT3DS_WCHAR_T_dropshadowvertalign L"dropshadowvertalign" // To be removed in 2.x (when UIP version is next updated)
#define QT3DS_WCHAR_T_wordwrap L"wordwrap"
#define QT3DS_WCHAR_T_boundingbox L"boundingbox"
#define QT3DS_WCHAR_T_elide L"elide"
diff --git a/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.h b/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.h
index 664fc6f8..1a079402 100644
--- a/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.h
+++ b/src/Authoring/QT3DSDM/Systems/Qt3DSDMComposerTypeDefinitions.h
@@ -287,11 +287,8 @@ class IPropertySystem;
HANDLE_COMPOSER_PROPERTY(tracking, m_Tracking, float, 0.f) \
HANDLE_COMPOSER_PROPERTY(dropshadow, m_DropShadow, bool, false) \
HANDLE_COMPOSER_PROPERTY(dropshadowstrength, m_DropShadowStrength, float, 80.f) \
- HANDLE_COMPOSER_PROPERTY(dropshadowoffset, m_DropShadowOffset, float, 10.f) \
HANDLE_COMPOSER_PROPERTY(dropshadowoffsetx, m_DropShadowOffsetX, float, 0.f) \
HANDLE_COMPOSER_PROPERTY(dropshadowoffsety, m_DropShadowOffsetY, float, 0.f) \
- HANDLE_COMPOSER_PROPERTY(dropshadowhorzalign, m_DropShadowHorizontalAlignment, TDataStrPtr, L"Right") \
- HANDLE_COMPOSER_PROPERTY(dropshadowvertalign, m_DropShadowVerticalAlignment, TDataStrPtr, L"Bottom") \
HANDLE_COMPOSER_PROPERTY(wordwrap, m_WordWrap, TDataStrPtr, L"WrapWord") \
HANDLE_COMPOSER_PROPERTY(boundingbox, m_BoundingBox, SFloat2, SFloat2(0, 0)) \
HANDLE_COMPOSER_PROPERTY(elide, m_Elide, TDataStrPtr, L"ElideNone") \
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp
index 2821cf8e..9b52667b 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/RowManager.cpp
@@ -91,18 +91,17 @@ RowTree *RowManager::createRowFromBinding(ITimelineItemBinding *binding, RowTree
binding->GetTimelineItem()->GetName().toQString(),
QString(), index);
+ // connect the new row and its binding
+ binding->setRowTree(newRow);
+ newRow->setBinding(binding);
+
// hide if material container
- const QString matContainerName = g_StudioApp.GetCore()->GetDoc()->GetStudioSystem()
- ->GetClientDataModelBridge()->getMaterialContainerName();
- if (newRow->rowType() == OBJTYPE_MATERIAL && newRow->label() == matContainerName) {
+ auto bridge = g_StudioApp.GetCore()->GetDoc()->GetStudioSystem()->GetClientDataModelBridge();
+ if (bridge->isMaterialContainer(newRow->instance())) {
newRow->setVisible(false);
newRow->rowTimeline()->setVisible(false);
}
- // connect the new row and its binding
- binding->setRowTree(newRow);
- newRow->setBinding(binding);
-
// set row start/end time & color
ITimelineTimebar *timebar = binding->GetTimelineItem()->GetTimebar();
RowTimeline *rowTimeline = newRow->rowTimeline();
diff --git a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp
index 1d54b64c..21281e42 100644
--- a/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp
+++ b/src/Authoring/Studio/Palettes/TimelineGraphicsView/ui/RowTree.cpp
@@ -706,7 +706,7 @@ bool RowTree::isInVariantsFilter() const
void RowTree::updateFilter()
{
auto bridge = g_StudioApp.GetCore()->GetDoc()->GetStudioSystem()->GetClientDataModelBridge();
- if (m_rowType == OBJTYPE_MATERIAL && m_label == bridge->getMaterialContainerName())
+ if (bridge->isMaterialContainer(instance()))
return;
bool parentOk = !m_parentRow || m_parentRow->isVisible();
@@ -920,7 +920,7 @@ void RowTree::updateLabel()
void RowTree::setRowVisible(bool visible)
{
auto bridge = g_StudioApp.GetCore()->GetDoc()->GetStudioSystem()->GetClientDataModelBridge();
- if (m_rowType == OBJTYPE_MATERIAL && m_label == bridge->getMaterialContainerName())
+ if (bridge->isMaterialContainer(instance()))
return;
if (visible) {
diff --git a/src/Authoring/Studio/Render/StudioRendererTranslation.cpp b/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
index 02f1c8a6..d2e92f67 100644
--- a/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
+++ b/src/Authoring/Studio/Render/StudioRendererTranslation.cpp
@@ -474,11 +474,8 @@ struct STranslatorDataModelParser
#define Text_Tracking m_Text.m_Tracking
#define Text_DropShadow m_Text.m_DropShadow
#define Text_DropShadowStrength m_Text.m_DropShadowStrength
-#define Text_DropShadowOffset m_Text.m_DropShadowOffset // To be removed in 2.x (when UIP version is next updated)
#define Text_DropShadowOffsetX m_Text.m_DropShadowOffsetX
#define Text_DropShadowOffsetY m_Text.m_DropShadowOffsetY
-#define Text_DropShadowHorizontalAlignment m_Text.m_DropShadowHorizontalAlignment // To be removed in 2.x (when UIP version is next updated)
-#define Text_DropShadowVerticalAlignment m_Text.m_DropShadowVerticalAlignment // To be removed in 2.x (when UIP version is next updated)
#define Text_WordWrap m_Text.m_WordWrap
#define Text_BoundingBox m_Text.m_BoundingBox
#define Text_Elide m_Text.m_Elide
diff --git a/src/Runtime/Source/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp b/src/Runtime/Source/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp
index d225d0ed..a4b3bc7e 100644
--- a/src/Runtime/Source/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp
+++ b/src/Runtime/Source/engine/Qt3DSRenderRuntimeBindingImplTranslation.cpp
@@ -654,11 +654,8 @@ struct SRuntimePropertyParser
#define Text_Tracking ATTRIBUTE_TRACKING
#define Text_DropShadow ATTRIBUTE_DROPSHADOW
#define Text_DropShadowStrength ATTRIBUTE_DROPSHADOWSTRENGTH
-#define Text_DropShadowOffset ATTRIBUTE_DROPSHADOWOFFSET
#define Text_DropShadowOffsetX ATTRIBUTE_DROPSHADOWOFFSETX
#define Text_DropShadowOffsetY ATTRIBUTE_DROPSHADOWOFFSETY
-#define Text_DropShadowHorizontalAlignment ATTRIBUTE_DROPSHADOWHORZALIGN
-#define Text_DropShadowVerticalAlignment ATTRIBUTE_DROPSHADOWVERTALIGN
#define Text_WordWrap ATTRIBUTE_WORDWRAP
#define Text_BoundingBox ATTRIBUTE_BOUNDINGBOX
#define Text_BoundingBox_X ATTRIBUTE_BOUNDINGBOX_X
diff --git a/src/Runtime/Source/runtime/Qt3DSAttributeHashes.cpp b/src/Runtime/Source/runtime/Qt3DSAttributeHashes.cpp
index 995b5704..766ce9ed 100644
--- a/src/Runtime/Source/runtime/Qt3DSAttributeHashes.cpp
+++ b/src/Runtime/Source/runtime/Qt3DSAttributeHashes.cpp
@@ -226,11 +226,8 @@ const char *GetAttributeString(const EAttribute inAttribute)
case ATTRIBUTE_FONT: return "font";
case ATTRIBUTE_DROPSHADOW: return "dropshadow";
case ATTRIBUTE_DROPSHADOWSTRENGTH: return "dropshadowstrength";
- case ATTRIBUTE_DROPSHADOWOFFSET: return "dropshadowoffset";
case ATTRIBUTE_DROPSHADOWOFFSETX: return "dropshadowoffsetx";
case ATTRIBUTE_DROPSHADOWOFFSETY: return "dropshadowoffsety";
- case ATTRIBUTE_DROPSHADOWHORZALIGN: return "dropshadowhorzalign";
- case ATTRIBUTE_DROPSHADOWVERTALIGN: return "dropshadowvertalign";
case ATTRIBUTE_BOUNDINGBOX: return "boundingbox";
case ATTRIBUTE_BOUNDINGBOX_X: return "boundingbox.x";
case ATTRIBUTE_BOUNDINGBOX_Y: return "boundingbox.y";
diff --git a/src/Runtime/Source/runtime/Qt3DSAttributeHashes.h b/src/Runtime/Source/runtime/Qt3DSAttributeHashes.h
index 3cbc165a..b2aa2280 100644
--- a/src/Runtime/Source/runtime/Qt3DSAttributeHashes.h
+++ b/src/Runtime/Source/runtime/Qt3DSAttributeHashes.h
@@ -217,11 +217,8 @@ enum EAttribute {
ATTRIBUTE_FONT = 0x03412331, // font
ATTRIBUTE_DROPSHADOW = 0x03E3F231, // dropshadow
ATTRIBUTE_DROPSHADOWSTRENGTH = 0x03F8B7D0, // dropshadowstrength
- ATTRIBUTE_DROPSHADOWOFFSET = 0x024A9C5E, // dropshadowoffset
ATTRIBUTE_DROPSHADOWOFFSETX = 0x013298AA, // dropshadowoffsetx
ATTRIBUTE_DROPSHADOWOFFSETY = 0x013398E9, // dropshadowoffsety
- ATTRIBUTE_DROPSHADOWHORZALIGN = 0x00D1BC39, // dropshadowhorzalign
- ATTRIBUTE_DROPSHADOWVERTALIGN = 0x038D589B, // dropshadowvertalign
ATTRIBUTE_BOUNDINGBOX = 0x02F3B6D9, // boundingbox
ATTRIBUTE_BOUNDINGBOX_X = 0x0272C10F, // boundingbox.x
ATTRIBUTE_BOUNDINGBOX_Y = 0x0273C14E, // boundingbox.y
diff --git a/src/Runtime/Source/runtime/Qt3DSAttributeHashes.txt b/src/Runtime/Source/runtime/Qt3DSAttributeHashes.txt
index 8eec133f..6a9508ef 100644
--- a/src/Runtime/Source/runtime/Qt3DSAttributeHashes.txt
+++ b/src/Runtime/Source/runtime/Qt3DSAttributeHashes.txt
@@ -184,11 +184,8 @@ size
font
dropshadow
dropshadowstrength
-dropshadowoffset
dropshadowoffsetx
dropshadowoffsety
-dropshadowhorzalign
-dropshadowvertalign
boundingbox
boundingbox.x
boundingbox.y
diff --git a/src/Runtime/Source/runtimerender/Qt3DSDistanceFieldRenderer.cpp b/src/Runtime/Source/runtimerender/Qt3DSDistanceFieldRenderer.cpp
index 21a090a8..960e0a2f 100644
--- a/src/Runtime/Source/runtimerender/Qt3DSDistanceFieldRenderer.cpp
+++ b/src/Runtime/Source/runtimerender/Qt3DSDistanceFieldRenderer.cpp
@@ -864,8 +864,6 @@ size_t getTextHashValue(const SText &text)
hashCombine(hashValue, text.m_DropShadowStrength);
hashCombine(hashValue, text.m_VerticalAlignment);
hashCombine(hashValue, text.m_HorizontalAlignment);
- hashCombine(hashValue, text.m_DropShadowVerticalAlignment);
- hashCombine(hashValue, text.m_DropShadowHorizontalAlignment);
return hashValue;
}
diff --git a/src/Runtime/Source/runtimerender/Qt3DSQtTextRenderer.cpp b/src/Runtime/Source/runtimerender/Qt3DSQtTextRenderer.cpp
index 4de7f9be..637aba94 100644
--- a/src/Runtime/Source/runtimerender/Qt3DSQtTextRenderer.cpp
+++ b/src/Runtime/Source/runtimerender/Qt3DSQtTextRenderer.cpp
@@ -545,33 +545,6 @@ struct Qt3DSQtTextRenderer : public ITextRenderer
break; // Do nothing
}
- qreal shadowOffsetX = qreal(inSrcText.m_FontSize * inSrcText.m_DropShadowOffsetX) / 1000.;
- qreal shadowOffsetY = qreal(inSrcText.m_FontSize * inSrcText.m_DropShadowOffsetY) / 1000.;
- // To be removed in 2.x (when UIP version is next updated)
- if (inSrcText.m_DropShadow && shadowOffsetX == 0. && shadowOffsetY == 0.) {
- const qreal offset = qreal(inSrcText.m_DropShadowOffset) / 10.;
- switch (inSrcText.m_DropShadowHorizontalAlignment) {
- case TextHorizontalAlignment::Left:
- shadowOffsetX = -offset;
- break;
- case TextHorizontalAlignment::Right:
- shadowOffsetX = offset;
- break;
- default:
- break;
- }
- switch (inSrcText.m_DropShadowVerticalAlignment) {
- case TextVerticalAlignment::Top:
- shadowOffsetY = -offset;
- break;
- case TextVerticalAlignment::Bottom:
- shadowOffsetY = offset;
- break;
- default:
- break;
- }
- }
-
int wordWrapFlags = 0;
if (dynamicTextArea) {
wordWrapFlags = Qt::TextDontClip;
@@ -607,6 +580,10 @@ struct Qt3DSQtTextRenderer : public ITextRenderer
QRectF bound(xTranslation, qreal(nextHeight), lineWidths.at(i), lineHeight);
QRectF actualBound;
if (inSrcText.m_DropShadow) {
+ qreal shadowOffsetX = qreal(inSrcText.m_FontSize * inSrcText.m_DropShadowOffsetX)
+ / 1000.;
+ qreal shadowOffsetY = qreal(inSrcText.m_FontSize * inSrcText.m_DropShadowOffsetY)
+ / 1000.;
QRectF boundShadow(xTranslation + shadowOffsetX, nextHeight + shadowOffsetY,
qreal(lineWidths.at(i)), lineHeight);
// shadow is a darker shade of the given font color
diff --git a/src/Runtime/Source/runtimerender/Qt3DSRenderTextTextureCache.cpp b/src/Runtime/Source/runtimerender/Qt3DSRenderTextTextureCache.cpp
index 304e64b6..5711d36f 100644
--- a/src/Runtime/Source/runtimerender/Qt3DSRenderTextTextureCache.cpp
+++ b/src/Runtime/Source/runtimerender/Qt3DSRenderTextTextureCache.cpp
@@ -55,14 +55,11 @@ struct hash<STextRenderInfo>
retval = retval ^ hash<float>()(inInfo.m_Tracking);
retval = retval ^ hash<bool>()(inInfo.m_DropShadow);
retval = retval ^ hash<float>()(inInfo.m_DropShadowStrength);
- retval = retval ^ hash<float>()(inInfo.m_DropShadowOffset); // To be removed in 2.x (when UIP version is next updated)
retval = retval ^ hash<float>()(inInfo.m_DropShadowOffsetX);
retval = retval ^ hash<float>()(inInfo.m_DropShadowOffsetY);
retval = retval ^ hash<float>()(inInfo.m_BoundingBox.x);
retval = retval ^ hash<float>()(inInfo.m_BoundingBox.y);
retval = retval ^ hash<int>()(static_cast<int>(inInfo.m_Elide));
- retval = retval ^ hash<int>()(static_cast<int>(inInfo.m_DropShadowHorizontalAlignment)); // To be removed in 2.x (when UIP version is next updated)
- retval = retval ^ hash<int>()(static_cast<int>(inInfo.m_DropShadowVerticalAlignment)); // To be removed in 2.x (when UIP version is next updated)
retval = retval ^ hash<int>()(static_cast<int>(inInfo.m_WordWrap));
retval = retval ^ hash<bool>()(inInfo.m_EnableAcceleratedFont);
return retval;
@@ -92,10 +89,6 @@ struct STextRenderInfoAndHash
&& m_Info.m_Tracking == inOther.m_Info.m_Tracking
&& m_Info.m_DropShadow == inOther.m_Info.m_DropShadow
&& m_Info.m_DropShadowStrength == inOther.m_Info.m_DropShadowStrength
- && m_Info.m_DropShadowOffset == inOther.m_Info.m_DropShadowOffset
- && m_Info.m_DropShadowHorizontalAlignment
- == inOther.m_Info.m_DropShadowHorizontalAlignment
- && m_Info.m_DropShadowVerticalAlignment == inOther.m_Info.m_DropShadowVerticalAlignment
&& m_Info.m_BoundingBox == inOther.m_Info.m_BoundingBox
&& m_Info.m_WordWrap == inOther.m_Info.m_WordWrap
&& m_Info.m_EnableAcceleratedFont == inOther.m_Info.m_EnableAcceleratedFont
diff --git a/src/Runtime/Source/runtimerender/Qt3DSRenderTextTypes.h b/src/Runtime/Source/runtimerender/Qt3DSRenderTextTypes.h
index 72ea9c15..bbaaa38d 100644
--- a/src/Runtime/Source/runtimerender/Qt3DSRenderTextTypes.h
+++ b/src/Runtime/Source/runtimerender/Qt3DSRenderTextTypes.h
@@ -173,11 +173,8 @@ namespace render {
QT3DSF32 m_Tracking; // space between letters
bool m_DropShadow;
QT3DSF32 m_DropShadowStrength;
- QT3DSF32 m_DropShadowOffset; // To be removed in 2.x (when UIP version is next updated)
QT3DSF32 m_DropShadowOffsetX;
QT3DSF32 m_DropShadowOffsetY;
- TextHorizontalAlignment::Enum m_DropShadowHorizontalAlignment; // To be removed in 2.x (when UIP version is next updated)
- TextVerticalAlignment::Enum m_DropShadowVerticalAlignment; // To be removed in 2.x (when UIP version is next updated)
TextWordWrap::Enum m_WordWrap;
QT3DSVec2 m_BoundingBox;
TextElide::Enum m_Elide;
@@ -185,7 +182,7 @@ namespace render {
QT3DSF32 m_ScaleX; // Pixel scale in X
QT3DSF32 m_ScaleY; // Pixel scale in Y
- bool m_EnableAcceleratedFont; ///< use NV path rendering
+ bool m_EnableAcceleratedFont; // use NV path rendering
STextRenderInfo();
~STextRenderInfo();
diff --git a/src/Runtime/Source/runtimerender/Qt3DSRenderUIPLoader.cpp b/src/Runtime/Source/runtimerender/Qt3DSRenderUIPLoader.cpp
index ce8dd631..9aad3973 100644
--- a/src/Runtime/Source/runtimerender/Qt3DSRenderUIPLoader.cpp
+++ b/src/Runtime/Source/runtimerender/Qt3DSRenderUIPLoader.cpp
@@ -843,11 +843,8 @@ struct SRenderUIPLoader : public IDOMReferenceResolver
#define Text_Tracking "tracking"
#define Text_DropShadow "dropshadow"
#define Text_DropShadowStrength "dropshadowstrength"
-#define Text_DropShadowOffset "dropshadowoffset" // To be removed in 2.x (when UIP version is next updated)
#define Text_DropShadowOffsetX "dropshadowoffsetx"
#define Text_DropShadowOffsetY "dropshadowoffsety"
-#define Text_DropShadowHorizontalAlignment "dropshadowhorzalign" // To be removed in 2.x (when UIP version is next updated)
-#define Text_DropShadowVerticalAlignment "dropshadowvertalign" // To be removed in 2.x (when UIP version is next updated)
#define Text_WordWrap "wordwrap"
#define Text_BoundingBox "boundingbox"
#define Text_Elide "elide"
diff --git a/src/Runtime/Source/runtimerender/Qt3DSRenderUIPSharedTranslation.h b/src/Runtime/Source/runtimerender/Qt3DSRenderUIPSharedTranslation.h
index 8ba74eae..16ce139d 100644
--- a/src/Runtime/Source/runtimerender/Qt3DSRenderUIPSharedTranslation.h
+++ b/src/Runtime/Source/runtimerender/Qt3DSRenderUIPSharedTranslation.h
@@ -452,11 +452,8 @@ namespace render {
HANDLE_QT3DS_RENDER_PROPERTY(Text, Tracking, TextDirty) \
HANDLE_QT3DS_RENDER_PROPERTY(Text, DropShadow, TextDirty) \
HANDLE_QT3DS_RENDER_PROPERTY(Text, DropShadowStrength, TextDirty) \
- HANDLE_QT3DS_RENDER_PROPERTY(Text, DropShadowOffset, TextDirty) \
HANDLE_QT3DS_RENDER_PROPERTY(Text, DropShadowOffsetX, TextDirty) \
HANDLE_QT3DS_RENDER_PROPERTY(Text, DropShadowOffsetY, TextDirty) \
- HANDLE_QT3DS_RENDER_ENUM_PROPERTY(Text, DropShadowHorizontalAlignment, TextDirty) \
- HANDLE_QT3DS_RENDER_ENUM_PROPERTY(Text, DropShadowVerticalAlignment, TextDirty) \
HANDLE_QT3DS_RENDER_ENUM_PROPERTY(Text, WordWrap, TextDirty) \
HANDLE_QT3DS_RENDER_REAL_VEC2_PROPERTY(Text, BoundingBox, TextDirty) \
HANDLE_QT3DS_RENDER_ENUM_PROPERTY(Text, Elide, TextDirty) \
diff --git a/src/Runtime/Source/runtimerender/graphobjects/Qt3DSRenderText.cpp b/src/Runtime/Source/runtimerender/graphobjects/Qt3DSRenderText.cpp
index b76240b4..40a20c48 100644
--- a/src/Runtime/Source/runtimerender/graphobjects/Qt3DSRenderText.cpp
+++ b/src/Runtime/Source/runtimerender/graphobjects/Qt3DSRenderText.cpp
@@ -39,11 +39,8 @@ STextRenderInfo::STextRenderInfo()
, m_Tracking(0)
, m_DropShadow(false)
, m_DropShadowStrength(80)
- , m_DropShadowOffset(10)
, m_DropShadowOffsetX(0)
, m_DropShadowOffsetY(0)
- , m_DropShadowHorizontalAlignment(TextHorizontalAlignment::Right)
- , m_DropShadowVerticalAlignment(TextVerticalAlignment::Bottom)
, m_WordWrap(TextWordWrap::WrapWord)
, m_BoundingBox(QT3DSVec2(0 ,0))
, m_Elide(TextElide::ElideNone)
@@ -60,7 +57,7 @@ STextRenderInfo::~STextRenderInfo()
SText::SText()
: SNode(GraphObjectTypes::Text)
, m_TextColor(1, 1, 1, 1)
- , m_TextTexture(NULL)
+ , m_TextTexture(nullptr)
{
m_Bounds.setEmpty();
}
diff --git a/src/Runtime/res/DataModelMetadata/en-us/MetaData.xml b/src/Runtime/res/DataModelMetadata/en-us/MetaData.xml
index 616e7e82..951a2fba 100644
--- a/src/Runtime/res/DataModelMetadata/en-us/MetaData.xml
+++ b/src/Runtime/res/DataModelMetadata/en-us/MetaData.xml
@@ -461,10 +461,6 @@
<Property name="dropshadowstrength" formalName="Shadow Darkness" category="Shadow" type="Float" min="0" max="100" default="80" description="Darkness of the shadow in percents.\n100 is black, 0 is the same color as the text." />
<Property name="dropshadowoffsetx" formalName="Horizontal Offset" category="Shadow" type="Float" min="-100" max="100" default="0" description="Horizontal offset of the shadow.\nIt is relative to the font size." />
<Property name="dropshadowoffsety" formalName="Vertical Offset" category="Shadow" type="Float" min="-100" max="100" default="0" description="Vertical offset of the shadow.\nIt is relative to the font size." />
- <!--To be removed in 2.x (when UIP version is next updated)
- <Property name="dropshadowoffset" formalName="Shadow Offset" description="Offset of the shadow. It\nis relative to the font size." min="1" max="100" type="Float" default="10" />
- <Property name="dropshadowhorzalign" formalName="Horizontal Position" description="Horizontal position of the shadow" list="Left:Center:Right" default="Right" />
- <Property name="dropshadowvertalign" formalName="Vertical Position" description="Vertical position of the shadow" list="Top:Middle:Bottom" default="Bottom" />-->
</Text>
<Path> <!-- (doesn't seem to be in use) -->