#include <dali-toolkit/devel-api/text/spannable-string.h>
#include <dali-toolkit/devel-api/text/spans/font-span.h>
#include <dali-toolkit/devel-api/text/spans/foreground-color-span.h>
+#include <dali-toolkit/devel-api/text/spans/underline-span.h>
#include <dali-toolkit/devel-api/text/text-enumerations-devel.h>
#include <dali-toolkit/internal/controls/text-controls/text-editor-impl.h>
#include <dali-toolkit/internal/controls/text-controls/text-field-impl.h>
#include <dali-toolkit/internal/controls/text-controls/text-label-impl.h>
+#include <dali-toolkit/internal/text/controller/text-controller.h>
#include <dali-toolkit/internal/text/font-description-run.h>
+#include <dali-toolkit/internal/text/rendering/text-typesetter.h>
+#include <dali-toolkit/internal/text/rendering/view-model.h>
+#include <dali-toolkit/internal/text/text-view.h>
#include <dali-toolkit/public-api/text/text-enumerations.h>
+#include <toolkit-text-utils.h>
using namespace Dali;
using namespace Toolkit;
namespace
{
const std::string DEFAULT_FONT_DIR("/resources/fonts");
-const float PIXEL_FORMAT_64_FACTOR = 64.f; ///< 64.f is used to convert from point size to 26.6 pixel format.
+const float PIXEL_FORMAT_64_FACTOR = 64.f; ///< 64.f is used to convert from point size to 26.6 pixel format.
} // namespace
Text::SpannableString CreateSpannableStringForForegroundColorSpan()
return spannableString;
}
+Text::SpannableString CreateSpannableStringForUnderlineSpan()
+{
+ Text::SpannableString spannableString = Text::SpannableString::New("Hello World");
+ DALI_TEST_CHECK(spannableString);
+
+ auto isAddedUnderlineSpan = spannableString.AttachSpan(
+ Text::UnderlineSpan::NewDashed(Color::GREEN, 5.0f, 2.0f, 3.0f),
+ Text::Range::New(5u, 7u));
+ DALI_TEST_CHECK(isAddedUnderlineSpan);
+
+ return spannableString;
+}
+
void CheckColorIndices(const Text::ColorIndex* const colorIndicesBuffer,
uint32_t numberOfIndices,
std::vector<uint32_t> indicesToCheck,
application.SendNotification();
application.Render();
- Toolkit::Internal::TextLabel& labelImpl = GetImpl(textLabel);
- const Text::ColorIndex* const colorIndicesBuffer = labelImpl.GetTextController()->GetTextModel()->GetColorIndices();
+ Toolkit::Internal::TextLabel& labelImpl = GetImpl(textLabel);
+ const Text::ColorIndex* const colorIndicesBuffer = labelImpl.GetTextController()->GetTextModel()->GetColorIndices();
CheckColorIndices(colorIndicesBuffer, 4u, {0u, 5u, 7u, 10u}, {0u, 1u, 1u, 0u});
application.SendNotification();
application.Render();
- Toolkit::Internal::TextLabel& labelImpl = GetImpl(textLabel);
+ Toolkit::Internal::TextLabel& labelImpl = GetImpl(textLabel);
const Vector<Dali::Toolkit::Text::FontRun>& validFontRuns = labelImpl.GetTextController()->GetTextModel()->GetFontRuns();
DALI_TEST_EQUALS(validFontRuns.Count(), 3u, TEST_LOCATION);
DALI_TEST_EQUALS(validFontDescriptionRuns[0].slant, Dali::TextAbstraction::FontSlant::OBLIQUE, TEST_LOCATION);
END_TEST;
+}
+
+int UtcDaliTextModelIsSpannedTextPlaced(void)
+
+{
+ tet_infoline(" UtcDaliTextModelIsSpannedTextPlaced");
+
+ ToolkitTestApplication application;
+
+ // Create spanned-text and set it
+ Text::SpannableString spannedText = Text::SpannableString::New("Hello مرحبا");
+ DALI_TEST_CHECK(spannedText);
+
+ // Creates a text controller.
+ Dali::Toolkit::Text::ControllerPtr controllerTextEditor = Dali::Toolkit::Text::Controller::New();
+ const Dali::Toolkit::Text::ModelInterface* modelEditor = controllerTextEditor->GetTextModel();
+
+ // Tests the rendering controller has been created.
+ Dali::Toolkit::Text::TypesetterPtr typesetterEditor = Dali::Toolkit::Text::Typesetter::New(controllerTextEditor->GetTextModel());
+ DALI_TEST_CHECK(typesetterEditor);
+
+ // Tests the view model has been created.
+ Dali::Toolkit::Text::ViewModel* viewModelEditor = typesetterEditor->GetViewModel();
+ DALI_TEST_CHECK(viewModelEditor);
+
+ // Configures the text controller similarly to the text-editor.
+ Dali::Toolkit::Text::ConfigureTextEditor(controllerTextEditor);
+
+ DALI_TEST_EQUALS(false, modelEditor->IsSpannedTextPlaced(), TEST_LOCATION);
+ DALI_TEST_EQUALS(false, viewModelEditor->IsSpannedTextPlaced(), TEST_LOCATION);
+
+ controllerTextEditor->SetSpannedText(spannedText);
+
+ DALI_TEST_EQUALS(true, modelEditor->IsSpannedTextPlaced(), TEST_LOCATION);
+ DALI_TEST_EQUALS(true, viewModelEditor->IsSpannedTextPlaced(), TEST_LOCATION);
+
+ // Creates a text controller.
+ Dali::Toolkit::Text::ControllerPtr controllerTextLabel = Dali::Toolkit::Text::Controller::New();
+ const Dali::Toolkit::Text::ModelInterface* modelLabel = controllerTextLabel->GetTextModel();
+
+ // Tests the rendering controller has been created.
+ Dali::Toolkit::Text::TypesetterPtr typesetterLabel = Dali::Toolkit::Text::Typesetter::New(controllerTextLabel->GetTextModel());
+ DALI_TEST_CHECK(typesetterLabel);
+
+ // Tests the view model has been created.
+ Dali::Toolkit::Text::ViewModel* viewModelLabel = typesetterLabel->GetViewModel();
+ DALI_TEST_CHECK(viewModelLabel);
+
+ // Configures the text controller similarly to the text-label.
+ Dali::Toolkit::Text::ConfigureTextLabel(controllerTextLabel);
+
+ DALI_TEST_EQUALS(false, modelLabel->IsSpannedTextPlaced(), TEST_LOCATION);
+ DALI_TEST_EQUALS(false, viewModelLabel->IsSpannedTextPlaced(), TEST_LOCATION);
+
+ controllerTextLabel->SetSpannedText(spannedText);
+
+ DALI_TEST_EQUALS(true, modelLabel->IsSpannedTextPlaced(), TEST_LOCATION);
+ DALI_TEST_EQUALS(true, viewModelLabel->IsSpannedTextPlaced(), TEST_LOCATION);
+
+ // Creates a text controller.
+ Dali::Toolkit::Text::ControllerPtr controllerTextField = Dali::Toolkit::Text::Controller::New();
+ const Dali::Toolkit::Text::ModelInterface* modelField = controllerTextField->GetTextModel();
+
+ // Tests the rendering controller has been created.
+ Dali::Toolkit::Text::TypesetterPtr typesetterField = Dali::Toolkit::Text::Typesetter::New(controllerTextField->GetTextModel());
+ DALI_TEST_CHECK(typesetterField);
+
+ // Tests the view model has been created.
+ Dali::Toolkit::Text::ViewModel* viewModelField = typesetterField->GetViewModel();
+ DALI_TEST_CHECK(viewModelField);
+
+ // Configures the text controller similarly to the text-field.
+ Dali::Toolkit::Text::ConfigureTextField(controllerTextField);
+
+ DALI_TEST_EQUALS(false, modelField->IsSpannedTextPlaced(), TEST_LOCATION);
+ DALI_TEST_EQUALS(false, viewModelField->IsSpannedTextPlaced(), TEST_LOCATION);
+
+ controllerTextField->SetSpannedText(spannedText);
+
+ DALI_TEST_EQUALS(true, modelField->IsSpannedTextPlaced(), TEST_LOCATION);
+ DALI_TEST_EQUALS(true, viewModelField->IsSpannedTextPlaced(), TEST_LOCATION);
+
+ tet_result(TET_PASS);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextLabelSetSpannedText_UnderlineSpan(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextLabelSetSpannedText_UnderlineSpan ");
+
+ Dali::Toolkit::Text::UnderlineStyleProperties expectedProperties = {
+ Text::Underline::DASHED,
+ Color::GREEN,
+ 5u,
+ 2u,
+ 3u,
+ true,
+ true,
+ true,
+ true,
+ true};
+
+ TextLabel textLabel = TextLabel::New();
+ DALI_TEST_CHECK(textLabel);
+ application.GetScene().Add(textLabel);
+
+ Text::SpannableString spannableString = CreateSpannableStringForUnderlineSpan();
+
+ Text::SetSpannedText(textLabel, spannableString);
+
+ application.SendNotification();
+ application.Render();
+
+ Toolkit::Internal::TextLabel& labelImpl = GetImpl(textLabel);
+ const Text::Length numberOfUnderlineRuns = labelImpl.GetTextController()->GetTextModel()->GetNumberOfUnderlineRuns();
+
+ DALI_TEST_EQUALS(numberOfUnderlineRuns, 1u, TEST_LOCATION);
+
+ Vector<Dali::Toolkit::Text::UnderlinedGlyphRun> underlineRuns;
+
+ underlineRuns.Resize(numberOfUnderlineRuns);
+
+ labelImpl.GetTextController()->GetTextModel()->GetUnderlineRuns(underlineRuns.Begin(), 0u, numberOfUnderlineRuns);
+
+ DALI_TEST_EQUALS(underlineRuns[0].glyphRun.glyphIndex, 5u, TEST_LOCATION);
+ DALI_TEST_EQUALS(underlineRuns[0].glyphRun.numberOfGlyphs, 3u, TEST_LOCATION);
+ DALI_TEST_CHECK(underlineRuns[0].properties == expectedProperties);
+
+ END_TEST;
}
\ No newline at end of file
#include <dali-toolkit-test-suite-utils.h>
#include <dali-toolkit/dali-toolkit.h>
-#include <toolkit-text-utils.h>
-#include <dali-toolkit/internal/text/font-description-run.h>
+#include <dali-toolkit/devel-api/text/spannable-string.h>
#include <dali-toolkit/internal/text/controller/text-controller.h>
+#include <dali-toolkit/internal/text/font-description-run.h>
#include <dali-toolkit/internal/text/rendering/text-typesetter.h>
#include <dali-toolkit/internal/text/rendering/view-model.h>
+#include <toolkit-text-utils.h>
using namespace Dali;
using namespace Toolkit;
utc-Dali-Text-FontSpan.cpp
utc-Dali-Text-Range.cpp
utc-Dali-Text-SpannableString.cpp
+ utc-Dali-Text-UnderlineSpan.cpp
utc-Dali-TextEditor.cpp
utc-Dali-TextField.cpp
utc-Dali-TextGeometry.cpp
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <stdlib.h>
+#include <unistd.h>
+#include <iostream>
+
+#include <dali-toolkit-test-suite-utils.h>
+#include <dali-toolkit/dali-toolkit.h>
+#include <dali-toolkit/devel-api/text/spans/underline-span.h>
+
+using namespace Dali;
+using namespace Toolkit;
+
+int UtcDaliToolkitTextUnderlineSpanNew(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextUnderlineSpanNew");
+
+ auto underlineSpan = Text::UnderlineSpan::New();
+ DALI_TEST_CHECK(underlineSpan);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextUnderlineSpanNewSolid(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextUnderlineSpanNewSolid");
+
+ auto underlineSpan = Text::UnderlineSpan::NewSolid(Color::GREEN, 5.0f);
+ DALI_TEST_CHECK(underlineSpan);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextUnderlineSpanNewDashed(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextUnderlineSpanNewDashed");
+
+ auto underlineSpan = Text::UnderlineSpan::NewDashed(Color::GREEN, 5.0f, 2.0f, 3.0f);
+ DALI_TEST_CHECK(underlineSpan);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextUnderlineSpanNewDouble(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextUnderlineSpanNewDouble");
+
+ auto underlineSpan = Text::UnderlineSpan::NewDouble(Color::GREEN, 5.0f);
+ DALI_TEST_CHECK(underlineSpan);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextGetType(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextGetType");
+
+ auto underlineSpan = Text::UnderlineSpan::NewDouble(Color::GREEN, 5.0f);
+ DALI_TEST_CHECK(underlineSpan);
+ DALI_TEST_EQUALS(Text::Underline::DOUBLE, underlineSpan.GetType(), TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextIsTypeDefined(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextIsTypeDefined");
+
+ auto underlineSpan = Text::UnderlineSpan::NewDouble(Color::GREEN, 5.0f);
+ DALI_TEST_CHECK(underlineSpan);
+ DALI_TEST_EQUALS(true, underlineSpan.IsTypeDefined(), TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextGetColor(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextGetColor");
+
+ auto underlineSpan = Text::UnderlineSpan::NewSolid(Color::GREEN, 5.0f);
+ DALI_TEST_CHECK(underlineSpan);
+ DALI_TEST_EQUALS(Color::GREEN, underlineSpan.GetColor(), TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextIsColorDefined(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextIsColorDefined");
+
+ auto underlineSpan = Text::UnderlineSpan::NewSolid(Color::GREEN, 5.0f);
+ DALI_TEST_CHECK(underlineSpan);
+ DALI_TEST_EQUALS(true, underlineSpan.IsColorDefined(), TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextGetHeight(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextGetHeight");
+
+ auto underlineSpan = Text::UnderlineSpan::NewSolid(Color::GREEN, 5.0f);
+ DALI_TEST_CHECK(underlineSpan);
+ DALI_TEST_EQUALS(5.0f, underlineSpan.GetHeight(), TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextIsHeightDefined(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextIsHeightDefined");
+
+ auto underlineSpan = Text::UnderlineSpan::NewSolid(Color::GREEN, 5.0f);
+ DALI_TEST_CHECK(underlineSpan);
+ DALI_TEST_EQUALS(true, underlineSpan.IsHeightDefined(), TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextGetDashGap(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextGetDashGap");
+
+ auto underlineSpan = Text::UnderlineSpan::NewDashed(Color::GREEN, 5.0f, 2.0f, 3.0f);
+ DALI_TEST_CHECK(underlineSpan);
+ DALI_TEST_EQUALS(2.0f, underlineSpan.GetDashGap(), TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextIsDashGapDefined(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextIsDashGapDefined");
+
+ auto underlineSpan = Text::UnderlineSpan::NewDashed(Color::GREEN, 5.0f, 2.0f, 3.0f);
+ DALI_TEST_CHECK(underlineSpan);
+ DALI_TEST_EQUALS(true, underlineSpan.IsDashGapDefined(), TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextGetDashWidth(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextGetDashWidth");
+
+ auto underlineSpan = Text::UnderlineSpan::NewDashed(Color::GREEN, 5.0f, 2.0f, 3.0f);
+ DALI_TEST_CHECK(underlineSpan);
+ DALI_TEST_EQUALS(3.0f, underlineSpan.GetDashWidth(), TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextIsDashWidthDefined(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextIsDashWidthDefined");
+
+ auto underlineSpan = Text::UnderlineSpan::NewDashed(Color::GREEN, 5.0f, 2.0f, 3.0f);
+ DALI_TEST_CHECK(underlineSpan);
+ DALI_TEST_EQUALS(true, underlineSpan.IsDashWidthDefined(), TEST_LOCATION);
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextUnderlineSpanDownCast(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextUnderlineSpanDownCast");
+
+ Text::BaseSpan baseSpan = Text::UnderlineSpan::New();
+ DALI_TEST_CHECK(baseSpan);
+
+ Text::UnderlineSpan underlineSpan = Text::UnderlineSpan::DownCast(baseSpan);
+ DALI_TEST_CHECK(underlineSpan);
+
+ END_TEST;
+}
# Doxyfile 1.8.11
+# Note : If you want to upgrade Doxyfile into 1.9.1
+# Find "###1.9.1###" and remove these comments.
+# For example,
+# ###1.9.1###PYTHON_DOCSTRING = YES -->
+# PYTHON_DOCSTRING = YES
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
# Project related configuration options
#---------------------------------------------------------------------------
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
+# This tag specifies the encoding used for all characters in the configuration
+# file that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
# The default value is: UTF-8.
DOXYFILE_ENCODING = UTF-8
OUTPUT_LANGUAGE = English
+# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all generated output in the proper direction.
+# Possible values are: None, LTR, RTL and Context.
+# The default value is: None.
+
+OUTPUT_TEXT_DIRECTION = None
+
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
# descriptions after the members that are listed in the file and class
# documentation (similar to Javadoc). Set to NO to disable this.
JAVADOC_AUTOBRIEF = YES
+# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
+# such as
+# /***************
+# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
+# Javadoc-style will behave just like regular comments and it will not be
+# interpreted by doxygen.
+# The default value is: NO.
+
+JAVADOC_BANNER = NO
+
# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
# line (until the first dot) of a Qt-style comment as the brief description. If
# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
MULTILINE_CPP_IS_BRIEF = NO
+# By default Python docstrings are displayed as preformatted text and doxygen's
+# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
+# doxygen's special commands can be used and the contents of the docstring
+# documentation blocks is shown as doxygen documentation.
+# The default value is: YES.
+
+###1.9.1###PYTHON_DOCSTRING = YES
+
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
# documentation from any documented member that it re-implements.
# The default value is: YES.
# will allow you to put the command \sideeffect (or @sideeffect) in the
# documentation, which will result in a user-defined paragraph with heading
# "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
+# newlines (in the resulting output). You can put ^^ in the value part of an
+# alias to insert a newline as if a physical newline was in the original file.
+# When you need a literal { or } or , in the value part of an alias you have to
+# escape them by means of a backslash (\), this can lead to conflicts with the
+# commands \{ and \} for these it is advised to use the version @{ and @} or use
+# a double escape (\\{ and \\})
ALIASES =
# Clip alias inserts the specified file between two text markers.
#ALIASES += REMARK_STORAGE="@remarks %http://tizen.org/privilege/mediastorage is needed if @a url is relevant to media storage. @remarks %http://tizen.org/privilege/externalstorage is needed if @a url is relevant to external storage."
#ALIASES += REMARK_RAWVIDEO="@remarks %http://tizen.org/feature/multimedia.raw_video is needed if UNDERLAY is false. If the feature isn't supported, UNDERLAY is always true."
-# This tag can be used to specify a number of word-keyword mappings (TCL only).
-# A mapping has the form "name=value". For example adding "class=itcl::class"
-# will allow you to use the command class in the itcl::class meaning.
-
-TCL_SUBST =
-
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For
# instance, some of the names that are used will be different. The list of all
OPTIMIZE_OUTPUT_VHDL = NO
+# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
+# sources only. Doxygen will then generate output that is more tailored for that
+# language. For instance, namespaces will be presented as modules, types will be
+# separated into more groups, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_SLICE = NO
+
# Doxygen selects the parser to use depending on the extension of the files it
# parses. With this tag you can assign which parser to use for a given
# extension. Doxygen has a built-in mapping, but you can override or extend it
# using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
-# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
-# Fortran. In the later case the parser tries to guess whether the code is fixed
-# or free formatted code, this is the default for Fortran type files), VHDL. For
-# instance to make doxygen treat .inc files as Fortran files (default is PHP),
-# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
+# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL,
+# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
+# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
+# tries to guess whether the code is fixed or free formatted code, this is the
+# default for Fortran type files). For instance to make doxygen treat .inc files
+# as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C.
#
# Note: For files without extension you can use no_extension as a placeholder.
#
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
-# the files are not read by doxygen.
+# the files are not read by doxygen. When specifying no_extension you should add
+# * to the FILE_PATTERNS.
+#
+# Note see also the list of default file extension mappings.
EXTENSION_MAPPING =
# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
# according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# documentation. See https://daringfireball.net/projects/markdown/ for details.
# The output of markdown processing is further processed by doxygen, so you can
# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
# case of backward compatibilities issues.
MARKDOWN_SUPPORT = YES
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 5.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS = 5
+
# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
# be prevented in individual cases by putting a % sign in front of the word or
CPP_CLI_SUPPORT = NO
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
# will parse them like normal C++ but will assume all classes use public instead
# of private inheritance when no explicit protection keyword is present.
# The default value is: NO.
LOOKUP_CACHE_SIZE = 0
+# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use
+# during processing. When set to 0 doxygen will based this on the number of
+# cores available in the system. You can set it explicitly to a value larger
+# than 0 to get more control over the balance between CPU load and processing
+# speed. At this moment only the input processing can be done using multiple
+# threads. Since this is still an experimental feature the default is set to 1,
+# which efficively disables parallel processing. Please report any issues you
+# encounter. Generating dot graphs in parallel is controlled by the
+# DOT_NUM_THREADS setting.
+# Minimum value: 0, maximum value: 32, default value: 1.
+
+###1.9.1###NUM_PROC_THREADS = 1
+
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
EXTRACT_PRIVATE = YES
+# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
+# methods of a class will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIV_VIRTUAL = NO
+
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
# scope will be included in the documentation.
# The default value is: NO.
EXTRACT_ANON_NSPACES = NO
+# If this flag is set to YES, the name of an unnamed parameter in a declaration
+# will be determined by the corresponding definition. By default unnamed
+# parameters remain unnamed in the output.
+# The default value is: YES.
+
+###1.9.1###RESOLVE_UNNAMED_PARAMS = YES
+
# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
# undocumented members inside documented classes or files. If set to NO these
# members will be included in the various overviews, but no documentation
HIDE_UNDOC_CLASSES = NO
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO, these declarations will be
-# included in the documentation.
+# declarations. If set to NO, these declarations will be included in the
+# documentation.
# The default value is: NO.
HIDE_FRIEND_COMPOUNDS = NO
INTERNAL_DOCS = NO
-# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES, upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
+# With the correct setting of option CASE_SENSE_NAMES doxygen will better be
+# able to match the capabilities of the underlying filesystem. In case the
+# filesystem is case sensitive (i.e. it supports files in the same directory
+# whose names only differ in casing), the option must be set to YES to properly
+# deal with such files in case they appear in the input. For filesystems that
+# are not case sensitive the option should be be set to NO to properly deal with
+# output files written for symbols that only differ in casing, such as for two
+# classes, one named CLASS and the other named Class, and to also support
+# references to files without having to specify the exact matching casing. On
+# Windows (including Cygwin) and MacOS, users should typically set this option
+# to NO, whereas on Linux or other Unix flavors it should typically be set to
+# YES.
# The default value is: system dependent.
CASE_SENSE_NAMES = NO
# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
# the reference definitions. This must be a list of .bib files. The .bib
# extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
# For LaTeX the style of the bibliography can be controlled using
# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
# search path. See also \cite for info how to create references.
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
# are documented, but have no documentation for their parameters or return
# value. If set to NO, doxygen will only warn about wrong or incomplete
-# parameter documentation, but not about the absence of documentation.
+# parameter documentation, but not about the absence of documentation. If
+# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
# The default value is: NO.
WARN_NO_PARAMDOC = YES
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
-# a warning is encountered.
+# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
+# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
+# at the end of the doxygen process doxygen will return with a non-zero status.
+# Possible values are: NO, YES and FAIL_ON_WARNINGS.
# The default value is: NO.
WARN_AS_ERROR = NO
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
-# possible encodings.
+# documentation (see:
+# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
# The default value is: UTF-8.
INPUT_ENCODING = UTF-8
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# read by doxygen.
#
+# Note the list of default checked file patterns might differ from the list of
+# default file extension mappings.
+#
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
-# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl,
-# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js.
+# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment),
+# *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd, *.vhdl,
+# *.ucf, *.qsf and *.ice.
FILE_PATTERNS = *.h \
*.md
STRIP_CODE_COMMENTS = NO
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
+# entity all documented functions referencing it will be listed.
# The default value is: NO.
REFERENCED_BY_RELATION = NO
# If the USE_HTAGS tag is set to YES then the references to source code will
# point to the HTML generated by the htags(1) tool instead of doxygen built-in
# source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
+# (see https://www.gnu.org/software/global/global.html). You will need version
# 4.8.6 or higher.
#
# To use it do the following:
# - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
# - Make sure the INPUT points to the root of the source tree
# - Run doxygen as normal
#
VERBATIM_HEADERS = YES
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
-# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
-# cost of reduced performance. This can be particularly helpful with template
-# rich C++ code for which doxygen's built-in parser lacks the necessary type
-# information.
+# clang parser (see:
+# http://clang.llvm.org/) for more accurate parsing at the cost of reduced
+# performance. This can be particularly helpful with template rich C++ code for
+# which doxygen's built-in parser lacks the necessary type information.
# Note: The availability of this option depends on whether or not doxygen was
-# generated with the -Duse-libclang=ON option for CMake.
+# generated with the -Duse_libclang=ON option for CMake.
# The default value is: NO.
CLANG_ASSISTED_PARSING = NO
+# If clang assisted parsing is enabled and the CLANG_ADD_INC_PATHS tag is set to
+# YES then doxygen will add the directory of each input to the include path.
+# The default value is: YES.
+
+###1.9.1###CLANG_ADD_INC_PATHS = YES
+
# If clang assisted parsing is enabled you can provide the compiler with command
# line options that you would normally use when invoking the compiler. Note that
# the include paths will already be set by doxygen for the files and directories
CLANG_OPTIONS =
+# If clang assisted parsing is enabled you can provide the clang parser with the
+# path to the directory containing a file called compile_commands.json. This
+# file is the compilation database (see:
+# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the
+# options used when the source files were built. This is equivalent to
+# specifying the -p option to a clang tool, such as clang-check. These options
+# will then be passed to the parser. Any options specified with CLANG_OPTIONS
+# will be added as well.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse_libclang=ON option for CMake.
+
+CLANG_DATABASE_PATH =
+
#---------------------------------------------------------------------------
# Configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
-# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
-# which the alphabetical index list will be split.
-# Minimum value: 1, maximum value: 20, default value: 5.
-# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
-
-COLS_IN_ALPHA_INDEX = 5
-
# In case all classes in a project start with a common prefix, all classes will
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
# can be used to specify a prefix (or a list of prefixes) that should be ignored
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the style sheet and background images according to
# this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
# purple, and 360 is red again.
# Minimum value: 0, maximum value: 359, default value: 220.
HTML_TIMESTAMP = YES
+# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
+# documentation will contain a main index with vertical navigation menus that
+# are dynamically created via JavaScript. If disabled, the navigation index will
+# consists of multiple levels of tabs that are statically embedded in every HTML
+# page. Disable this option to support browsers that do not have JavaScript,
+# like the Qt help browser.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_MENUS = YES
+
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded.
# If the GENERATE_DOCSET tag is set to YES, additional index files will be
# generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
-# Makefile in the HTML output directory. Running make will produce the docset in
-# that directory and running make install will install the docset in
+# environment (see:
+# https://developer.apple.com/xcode/), introduced with OSX 10.5 (Leopard). To
+# create a documentation set, doxygen will generate a Makefile in the HTML
+# output directory. Running make will produce the docset in that directory and
+# running make install will install the docset in
# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
+# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
+# genXcode/_index.html for more information.
# The default value is: NO.
# This tag requires that the tag GENERATE_HTML is set to YES.
# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
-# Windows.
+# (see:
+# https://www.microsoft.com/en-us/download/details.aspx?id=21138) on Windows.
#
# The HTML Help Workshop contains a compiler that can convert all HTML output
# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
HHC_LOCATION =
# The GENERATE_CHI flag controls if a separate .chi index file is generated
-# (YES) or that it should be included in the master .chm file (NO).
+# (YES) or that it should be included in the main .chm file (NO).
# The default value is: NO.
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
# Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
# The default value is: org.doxygen.Project.
# This tag requires that the tag GENERATE_QHP is set to YES.
# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
# Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
-# folders).
+# Folders (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-folders).
# The default value is: doc.
# This tag requires that the tag GENERATE_QHP is set to YES.
# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
# filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_NAME =
# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
# custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
-# filters).
+# Filters (see:
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-filters).
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_CUST_FILTER_ATTRS =
# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
# project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
# This tag requires that the tag GENERATE_QHP is set to YES.
QHP_SECT_FILTER_ATTRS =
-# The QHG_LOCATION tag can be used to specify the location of Qt's
-# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
-# generated .qhp file.
+# The QHG_LOCATION tag can be used to specify the location (absolute path
+# including file name) of Qt's qhelpgenerator. If non-empty doxygen will try to
+# run qhelpgenerator on the generated .qhp file.
# This tag requires that the tag GENERATE_QHP is set to YES.
QHG_LOCATION =
EXT_LINKS_IN_WINDOW = NO
+# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
+# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
+# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
+# the HTML output. These images will generally look nicer at scaled resolutions.
+# Possible values are: png (the default) and svg (looks nicer but requires the
+# pdf2svg or inkscape tool).
+# The default value is: png.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+###1.9.1###HTML_FORMULA_FORMAT = png
+
# Use this tag to change the font size of LaTeX formulas included as images in
# the HTML documentation. When you change the font size after a successful
# doxygen run you need to manually remove any form_*.png images from the HTML
FORMULA_FONTSIZE = 10
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
# generated for formulas are transparent PNGs. Transparent PNGs are not
# supported properly for IE 6.0, but are supported on all modern browsers.
#
FORMULA_TRANSPARENT = YES
+# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
+# to create new LaTeX commands to be used in formulas as building blocks. See
+# the section "Including formulas" for details.
+
+FORMULA_MACROFILE =
+
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
+# https://www.mathjax.org) which uses client side JavaScript for the rendering
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
# installed or if you want to formulas look prettier in the HTML output. When
# enabled you may also need to install MathJax separately and configure the path
# When MathJax is enabled you can set the default output format to be used for
# the MathJax output. See the MathJax site (see:
-# http://docs.mathjax.org/en/latest/output.html) for more details.
+# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details.
# Possible values are: HTML-CSS (which is slower, but has the best
# compatibility), NativeMML (i.e. MathML) and SVG.
# The default value is: HTML-CSS.
# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
# Content Delivery Network so you can quickly see the result without installing
# MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# MathJax from https://www.mathjax.org before deployment.
+# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2.
# This tag requires that the tag USE_MATHJAX is set to YES.
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
# of code that will be used on startup of the MathJax code. See the MathJax site
-# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# (see:
+# http://docs.mathjax.org/en/v2.7-latest/output.html) for more details. For an
# example see the documentation.
# This tag requires that the tag USE_MATHJAX is set to YES.
SEARCHENGINE = NO
# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
+# implemented using a web server instead of a web client using JavaScript. There
# are two flavors of web server based searching depending on the EXTERNAL_SEARCH
# setting. When disabled, doxygen will generate a PHP script for searching and
# an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
#
# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
+# Xapian (see:
+# https://xapian.org/).
#
# See the section "External Indexing and Searching" for details.
# The default value is: NO.
#
# Doxygen ships with an example indexer (doxyindexer) and search engine
# (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
-# Searching" for details.
+# Xapian (see:
+# https://xapian.org/). See the section "External Indexing and Searching" for
+# details.
# This tag requires that the tag SEARCHENGINE is set to YES.
SEARCHENGINE_URL =
# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
# invoked.
#
-# Note that when enabling USE_PDFLATEX this option is only used for generating
-# bitmaps for formulas in the HTML output, but not in the Makefile that is
-# written to the output directory.
-# The default file is: latex.
+# Note that when not enabling USE_PDFLATEX the default is latex when enabling
+# USE_PDFLATEX the default is pdflatex and when in the later case latex is
+# chosen this is overwritten by pdflatex. For specific output languages the
+# default can have been set differently, this depends on the implementation of
+# the output language.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_CMD_NAME = latex
# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
# index for LaTeX.
+# Note: This tag is used in the Makefile / make.bat.
+# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
+# (.tex).
# The default file is: makeindex.
# This tag requires that the tag GENERATE_LATEX is set to YES.
MAKEINDEX_CMD_NAME = makeindex
+# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
+# generate index for LaTeX. In case there is no backslash (\) as first character
+# it will be automatically added in the LaTeX code.
+# Note: This tag is used in the generated output file (.tex).
+# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
+# The default value is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_MAKEINDEX_CMD = makeindex
+
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
# documents. This may be useful for small projects and may help to save some
# trees in general.
# The default value is: a4.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-PAPER_TYPE = a4wide
+PAPER_TYPE = a4
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
# that should be included in the LaTeX output. The package can be specified just
PDF_HYPERLINKS = YES
-# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES, to get a
-# higher quality PDF documentation.
+# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
+# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
+# files. Set this option to YES, to get a higher quality PDF documentation.
+#
+# See also section LATEX_CMD_NAME for selecting the engine.
# The default value is: YES.
# This tag requires that the tag GENERATE_LATEX is set to YES.
# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
# bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
# The default value is: plain.
# This tag requires that the tag GENERATE_LATEX is set to YES.
LATEX_TIMESTAMP = NO
+# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
+# path from which the emoji images will be read. If a relative path is entered,
+# it will be relative to the LATEX_OUTPUT directory. If left blank the
+# LATEX_OUTPUT directory will be used.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EMOJI_DIRECTORY =
+
#---------------------------------------------------------------------------
# Configuration options related to the RTF output
#---------------------------------------------------------------------------
RTF_HYPERLINKS = NO
-# Load stylesheet definitions from file. Syntax is similar to doxygen's config
-# file, i.e. a series of assignments. You only have to provide replacements,
-# missing definitions are set to their default value.
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# configuration file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
#
# See also section "Doxygen usage" for information on how to generate the
# default style sheet that doxygen normally uses.
RTF_STYLESHEET_FILE =
# Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's config file. A template extensions file can be generated
-# using doxygen -e rtf extensionFile.
+# similar to doxygen's configuration file. A template extensions file can be
+# generated using doxygen -e rtf extensionFile.
# This tag requires that the tag GENERATE_RTF is set to YES.
RTF_EXTENSIONS_FILE =
XML_PROGRAMLISTING = YES
+# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
+# namespace members in file scope as well, matching the HTML output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_NS_MEMB_FILE_SCOPE = NO
+
#---------------------------------------------------------------------------
# Configuration options related to the DOCBOOK output
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see http://autogen.sf.net) file that captures the
-# structure of the code including all documentation. Note that this feature is
-# still experimental and incomplete at the moment.
+# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
+# the structure of the code including all documentation. Note that this feature
+# is still experimental and incomplete at the moment.
# The default value is: NO.
GENERATE_AUTOGEN_DEF = NO
EXTERNAL_PAGES = YES
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-#PERL_PATH = /usr/bin/perl
-
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = YES
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-#MSCGEN_PATH =
-
# You can include diagrams made with dia in doxygen documentation. Doxygen will
# then run dia to produce the diagram and insert it in the documentation. The
# DIA_PATH tag allows you to specify the directory where the dia binary resides.
# but if the number exceeds 15, the total amount of fields shown is limited to
# 10.
# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+UML_LIMIT_NUM_FIELDS = 10
+
+# If the DOT_UML_DETAILS tag is set to NO, doxygen will show attributes and
+# methods without types and arguments in the UML graphs. If the DOT_UML_DETAILS
+# tag is set to YES, doxygen will add type and arguments for attributes and
+# methods in the UML graphs. If the DOT_UML_DETAILS tag is set to NONE, doxygen
+# will not generate fields with class member information in the UML graphs. The
+# class diagrams will look similar to the default class diagrams but using UML
+# notation for the relationships.
+# Possible values are: NO, YES and NONE.
+# The default value is: NO.
+# This tag requires that the tag UML_LOOK is set to YES.
+
+###1.9.1###DOT_UML_DETAILS = NO
+
+# The DOT_WRAP_THRESHOLD tag can be used to set the maximum number of characters
+# to display on a single line. If the actual line length exceeds this threshold
+# significantly it will wrapped across multiple lines. Some heuristics are apply
+# to avoid ugly line breaks.
+# Minimum value: 0, maximum value: 1000, default value: 17.
# This tag requires that the tag HAVE_DOT is set to YES.
-UML_LIMIT_NUM_FIELDS = 10
+###1.9.1###DOT_WRAP_THRESHOLD = 17
# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
# collaboration graphs will show the relations between templates and their
PLANTUML_JAR_PATH =
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE =
+
# When using plantuml, the specified paths are searched for files specified by
# the !include statement in a plantuml block.
GENERATE_LEGEND = YES
-# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate
# files that are used to generate the various graphs.
+#
+# Note: This setting is not only used for dot files but also for msc and
+# plantuml temporary files.
# The default value is: YES.
-# This tag requires that the tag HAVE_DOT is set to YES.
DOT_CLEANUP = YES
#include <dali-toolkit/internal/controls/control/control-data-impl.h>
#include <dali-toolkit/public-api/image-loader/image-url.h>
#include <dali-toolkit/public-api/image-loader/image.h>
+#include <dali-toolkit/public-api/image-loader/sync-image-loader.h>
#include <dali/devel-api/actors/camera-actor-devel.h>
#include <dali/devel-api/adaptor-framework/window-devel.h>
#include <dali/devel-api/common/stage.h>
static constexpr std::string_view SKYBOX_INTENSITY_STRING = "uIntensity";
-Dali::Actor CreateSkybox(const std::string& skyboxUrl)
+Dali::Actor CreateSkybox(const std::string& skyboxUrl, Scene3D::SceneView::SkyboxType skyboxType)
{
struct Vertex
{
{Vector3(-1.0f, -1.0f, 1.0f)},
{Vector3(1.0f, -1.0f, 1.0f)}};
- Dali::Shader shaderSkybox = Shader::New(SHADER_SKYBOX_SHADER_VERT.data(), SHADER_SKYBOX_SHADER_FRAG.data());
Dali::VertexBuffer vertexBuffer = Dali::VertexBuffer::New(Property::Map().Add("aPosition", Property::VECTOR3));
vertexBuffer.SetData(skyboxVertices, sizeof(skyboxVertices) / sizeof(Vertex));
skyboxGeometry.AddVertexBuffer(vertexBuffer);
skyboxGeometry.SetType(Geometry::TRIANGLES);
- Dali::Texture skyboxTexture = Dali::Scene3D::Loader::LoadCubeMap(skyboxUrl);
+ Dali::Texture skyboxTexture;
+ Dali::Shader shaderSkybox;
+ Dali::Renderer skyboxRenderer;
+
+ if(skyboxType == Scene3D::SceneView::SkyboxType::CUBEMAP)
+ {
+ skyboxTexture = Dali::Scene3D::Loader::LoadCubeMap(skyboxUrl);
+ shaderSkybox = Shader::New(SHADER_SKYBOX_SHADER_VERT.data(), SHADER_SKYBOX_SHADER_FRAG.data());
+ }
+ else // Scene3D::SceneView::SkyboxType::EQUIRECTANGULAR
+ {
+ // Load image from file
+ PixelData pixels = Dali::Toolkit::SyncImageLoader::Load(skyboxUrl);
+
+ skyboxTexture = Texture::New(TextureType::TEXTURE_2D, pixels.GetPixelFormat(), pixels.GetWidth(), pixels.GetHeight());
+ skyboxTexture.Upload(pixels, 0, 0, 0, 0, pixels.GetWidth(), pixels.GetHeight());
+ shaderSkybox = Shader::New(SHADER_SKYBOX_SHADER_VERT.data(), SHADER_SKYBOX_EQUIRECTANGULAR_SHADER_FRAG.data());
+ }
+
Dali::TextureSet skyboxTextures = TextureSet::New();
skyboxTextures.SetTexture(0, skyboxTexture);
- Dali::Renderer skyboxRenderer = Renderer::New(skyboxGeometry, shaderSkybox);
+ skyboxRenderer = Renderer::New(skyboxGeometry, shaderSkybox);
skyboxRenderer.SetTextures(skyboxTextures);
skyboxRenderer.SetProperty(Renderer::Property::DEPTH_INDEX, 2.0f);
// Enables the depth test.
return mUseFrameBuffer;
}
-void SceneView::SetSkybox(const std::string& skyboxUrl)
+void SceneView::SetSkybox(const std::string& skyboxUrl, Scene3D::SceneView::SkyboxType skyboxType)
{
mSkyboxResourceReady = false;
if(mSkybox)
mSkybox.Unparent();
mSkybox.Reset();
}
- mSkybox = CreateSkybox(skyboxUrl);
+ mSkybox = CreateSkybox(skyboxUrl, skyboxType);
SetSkyboxIntensity(mSkyboxIntensity);
SetSkyboxOrientation(mSkyboxOrientation);
if(mRootLayer)
/**
* @copydoc SceneView::SetSkybox()
*/
- void SetSkybox(const std::string& skyboxUrl);
+ void SetSkybox(const std::string& skyboxUrl, Scene3D::SceneView::SkyboxType skyboxType);
/**
* @copydoc SceneView::SetSkyboxIntensity()
--- /dev/null
+// Fragment shader for a skybox in equirectangular projection
+precision mediump float;
+
+uniform sampler2D uSkyBoxEquirectangularTexture;
+
+uniform vec4 uColor;
+uniform float uIntensity;
+
+varying vec3 vTexCoord;
+
+// Take the sample direction as interpolated from the cube's local position,
+// and use this direction vector and the spherical to cartesian coordinate
+// conversion to sample the equirectangular map as if it's a cube map.
+
+const float M_1_PI = 0.3183; // The reciprocal of pi in radians
+const float M_1_2PI = 0.1591; // The reciprocal of 2*pi in radians
+
+const vec2 inverseAtan = vec2(M_1_2PI, M_1_PI);
+
+vec2 SampleEquirectangularMapAsCubeMap(vec3 v)
+{
+ vec2 uv = vec2(atan(v.z, v.x), asin(v.y));
+ uv *= inverseAtan;
+ uv += 0.5;
+ return uv;
+}
+
+void main()
+{
+ // Project the equirectangular map to a cube's faces
+ vec2 uv = SampleEquirectangularMapAsCubeMap(normalize(vTexCoord));
+
+ // Flip the texture UVs vertically
+ vec2 uvFlippped = vec2(uv.x, 1.0 - uv.y);
+
+ vec4 texColor = texture2D( uSkyBoxEquirectangularTexture, uvFlippped ) * uIntensity;
+ gl_FragColor = texColor * uColor;
+}
return GetImpl(*this).IsUsingFramebuffer();
}
-void SceneView::SetSkybox(const std::string& skyboxUrl)
+void SceneView::SetSkybox(const std::string& skyboxUrl, SkyboxType skyboxType)
{
- GetImpl(*this).SetSkybox(skyboxUrl);
+ GetImpl(*this).SetSkybox(skyboxUrl, skyboxType);
}
void SceneView::SetSkyboxIntensity(float intensity)
{
public:
/**
+ * @brief The skybox types
+ * @SINCE_2_2.6
+ */
+ enum class SkyboxType
+ {
+ CUBEMAP, ///< Skybox in cubemap
+ EQUIRECTANGULAR ///< Skybox in equirectangular projection
+ };
+
+ /**
* @brief Create an initialized SceneView.
*
* @SINCE_2_1.38
* Skybox texture is asynchronously loaded. When loading is finished, ResourceReady is emitted.
*
* @SINCE_2_2.0
- * @param[in] skyboxUrl Cube map image url for skybox.
+ * @param[in] skyboxUrl image url for skybox.
+ * @param[in] skyboxType The skybox type (by default it is cubemap).
*/
- void SetSkybox(const std::string& skyboxUrl);
+ void SetSkybox(const std::string& skyboxUrl, SkyboxType skyboxType = SkyboxType::CUBEMAP);
/**
* @brief Sets Skybox intensity.
${devel_api_src_dir}/text/spans/base-span.cpp
${devel_api_src_dir}/text/spans/foreground-color-span.cpp
${devel_api_src_dir}/text/spans/font-span.cpp
+ ${devel_api_src_dir}/text/spans/underline-span.cpp
${devel_api_src_dir}/transition-effects/cube-transition-cross-effect.cpp
${devel_api_src_dir}/transition-effects/cube-transition-effect.cpp
${devel_api_src_dir}/transition-effects/cube-transition-fold-effect.cpp
${devel_api_src_dir}/text/spans/base-span.h
${devel_api_src_dir}/text/spans/foreground-color-span.h
${devel_api_src_dir}/text/spans/font-span.h
+ ${devel_api_src_dir}/text/spans/underline-span.h
)
SET( devel_api_tool_bar_header_files
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/devel-api/text/spans/underline-span.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/text/spannable/spans/underline-span-impl.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Text
+{
+UnderlineSpan UnderlineSpan::New()
+{
+ return Internal::UnderlineSpan::New();
+}
+
+UnderlineSpan UnderlineSpan::NewSolid(Vector4 color, float height)
+{
+ return Internal::UnderlineSpan::NewSolid(color, height);
+}
+
+UnderlineSpan UnderlineSpan::NewDashed(Vector4 color, float height, float dashGap, float dashWidth)
+{
+ return Internal::UnderlineSpan::NewDashed(color, height, dashGap, dashWidth);
+}
+
+UnderlineSpan UnderlineSpan::NewDouble(Vector4 color, float height)
+{
+ return Internal::UnderlineSpan::NewDouble(color, height);
+}
+
+UnderlineSpan::UnderlineSpan(Internal::UnderlineSpan* internal)
+: BaseSpan(internal)
+{
+}
+
+UnderlineSpan::UnderlineSpan() = default;
+
+UnderlineSpan::UnderlineSpan(const UnderlineSpan& rhs) = default;
+
+UnderlineSpan::UnderlineSpan(UnderlineSpan&& rhs) = default;
+
+UnderlineSpan& UnderlineSpan::operator=(const UnderlineSpan& rhs) = default;
+
+UnderlineSpan& UnderlineSpan::operator=(UnderlineSpan&& rhs) = default;
+
+UnderlineSpan::~UnderlineSpan() = default;
+
+//Methods
+
+const Text::Underline::Type UnderlineSpan::GetType() const
+{
+ return GetImplementation(*this).GetType();
+}
+
+bool UnderlineSpan::IsTypeDefined() const
+{
+ return GetImplementation(*this).IsTypeDefined();
+}
+
+const Vector4 UnderlineSpan::GetColor() const
+{
+ return GetImplementation(*this).GetColor();
+}
+
+bool UnderlineSpan::IsColorDefined() const
+{
+ return GetImplementation(*this).IsColorDefined();
+}
+
+const float UnderlineSpan::GetHeight() const
+{
+ return GetImplementation(*this).GetHeight();
+}
+
+bool UnderlineSpan::IsHeightDefined() const
+{
+ return GetImplementation(*this).IsHeightDefined();
+}
+
+const float UnderlineSpan::GetDashGap() const
+{
+ return GetImplementation(*this).GetDashGap();
+}
+
+bool UnderlineSpan::IsDashGapDefined() const
+{
+ return GetImplementation(*this).IsDashGapDefined();
+}
+
+const float UnderlineSpan::GetDashWidth() const
+{
+ return GetImplementation(*this).GetDashWidth();
+}
+
+bool UnderlineSpan::IsDashWidthDefined() const
+{
+ return GetImplementation(*this).IsDashWidthDefined();
+}
+
+UnderlineSpan UnderlineSpan::DownCast(BaseHandle handle)
+{
+ return UnderlineSpan(dynamic_cast<Dali::Toolkit::Text::Internal::UnderlineSpan*>(handle.GetObjectPtr()));
+}
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
--- /dev/null
+#ifndef DALI_TOOLKIT_TEXT_UNDERLINE_SPAN_H
+#define DALI_TOOLKIT_TEXT_UNDERLINE_SPAN_H
+
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/devel-api/text/spans/base-span.h>
+#include <dali-toolkit/public-api/text/text-enumerations.h>
+#include <dali/public-api/common/constants.h>
+#include <dali/public-api/math/vector4.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Text
+{
+namespace Internal DALI_INTERNAL
+{
+class UnderlineSpan;
+}
+
+/**
+ * @brief UnderlineSpan is a handle to an object that specifies the underline properties for range of characters.
+ */
+class DALI_TOOLKIT_API UnderlineSpan : public BaseSpan
+{
+public:
+ /**
+ * @brief Create an initialized UnderlineSpan.
+ *
+ * @return A handle to a newly allocated Dali resource
+ */
+ static UnderlineSpan New();
+
+ /**
+ * @brief Create an initialized UnderlineSpan.
+ *
+ * @param[in] color The color of line.
+ * @param[in] height The height of line.
+ *
+ * @return A handle to a newly allocated Dali resource
+ */
+ static UnderlineSpan NewSolid(Vector4 color, float height);
+
+ /**
+ * @brief Create an initialized UnderlineSpan.
+ *
+ * @param[in] color The color of line.
+ * @param[in] height The height of line.
+ * @param[in] dashGap The dash-gap of line.
+ * @param[in] dashWidth The dash-width of line.
+ *
+ * @return A handle to a newly allocated Dali resource
+ */
+ static UnderlineSpan NewDashed(Vector4 color, float height, float dashGap, float dashWidth);
+
+ /**
+ * @brief Create an initialized UnderlineSpan.
+ *
+ * @param[in] color The color of line.
+ * @param[in] height The height of line.
+ *
+ * @return A handle to a newly allocated Dali resource
+ */
+ static UnderlineSpan NewDouble(Vector4 color, float height);
+
+ /**
+ * @brief Creates an uninitialized UnderlineSpan handle.
+ *
+ * Calling member functions with an uninitialized UnderlineSpan handle is not allowed.
+ */
+ UnderlineSpan();
+
+ /**
+ * @brief Copy constructor.
+ * @param[in] rhs A reference to the copied handle
+ */
+ UnderlineSpan(const UnderlineSpan& rhs);
+
+ /**
+ * @brief Move constructor.
+ * @param[in] rhs A reference to the handle to move
+ */
+ UnderlineSpan(UnderlineSpan&& rhs);
+
+ /**
+ * @brief Assignment operator.
+ * @param[in] rhs A reference to the copied handle
+ * @return A reference to this
+ */
+ UnderlineSpan& operator=(const UnderlineSpan& rhs);
+
+ /**
+ * @brief Move assignment operator.
+ * @param[in] rhs A reference to the moved handle
+ * @return A reference to this
+ */
+ UnderlineSpan& operator=(UnderlineSpan&& rhs);
+
+ /**
+ * @brief Non virtual destructor.
+ */
+ ~UnderlineSpan();
+
+ /**
+ * @brief Downcasts to a UnderlineSpan handle.
+ * If handle is not a UnderlineSpan, the returned handle is left uninitialized.
+ *
+ * @param[in] handle Handle to an object
+ * @return UnderlineSpan handle or an uninitialized handle
+ */
+ static UnderlineSpan DownCast(BaseHandle handle);
+
+public: //Methods
+ /**
+ * @brief Retrive the type of line.
+ *
+ * @return A type value.
+ */
+ const Text::Underline::Type GetType() const;
+
+ /**
+ * @brief Retrieve whether the type is defined.
+ *
+ * @return The return is true if type is defined, otherwise false.
+ */
+ bool IsTypeDefined() const;
+
+ /**
+ * @brief Retrive the color of line.
+ *
+ * @return A color value.
+ */
+ const Vector4 GetColor() const;
+
+ /**
+ * @brief Retrieve whether the color is defined.
+ *
+ * @return The return is true if color is defined, otherwise false.
+ */
+ bool IsColorDefined() const;
+
+ /**
+ * @brief Retrive the height of line.
+ *
+ * @return A height value.
+ */
+ const float GetHeight() const;
+
+ /**
+ * @brief Retrieve whether the height is defined.
+ *
+ * @return The return is true if height is defined, otherwise false.
+ */
+ bool IsHeightDefined() const;
+
+ /**
+ * @brief Retrive the dash-gap of line.
+ *
+ * @return A dash-gap value.
+ */
+ const float GetDashGap() const;
+
+ /**
+ * @brief Retrieve whether the dash-gap is defined.
+ *
+ * @return The return is true if dash-gap is defined, otherwise false.
+ */
+ bool IsDashGapDefined() const;
+
+ /**
+ * @brief Retrive the dash-width of line.
+ *
+ * @return A dash-width value.
+ */
+ const float GetDashWidth() const;
+
+ /**
+ * @brief Retrieve whether the dash-width is defined.
+ *
+ * @return The return is true if dash-width is defined, otherwise false.
+ */
+ bool IsDashWidthDefined() const;
+
+public: // Not intended for application developers
+ /// @cond internal
+ /**
+ * @brief This constructor is used internally to Create an initialized UnderlineSpan handle.
+ *
+ * @param[in] underlineSpan Pointer to internal UnderlineSpan
+ */
+ explicit DALI_INTERNAL UnderlineSpan(Internal::UnderlineSpan* underlineSpan);
+ /// @endcond
+};
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_TEXT_UNDERLINE_SPAN_H
${toolkit_src_dir}/text/spannable/spans/base-span-impl.cpp
${toolkit_src_dir}/text/spannable/spans/foreground-color-span-impl.cpp
${toolkit_src_dir}/text/spannable/spans/font-span-impl.cpp
+ ${toolkit_src_dir}/text/spannable/spans/underline-span-impl.cpp
${toolkit_src_dir}/text/spannable/span-ranges-container-impl.cpp
${toolkit_src_dir}/text/hyphenator.cpp
${toolkit_src_dir}/text/text-enumerations-impl.cpp
impl.mModel->mVisualModel->mUnderlineRuns.PushBack(underlineRun);
//Mark-up processor case
- if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled())
+ if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
+ impl.mModel->mLogicalModel->mUnderlineRunsUpdated)
{
impl.CopyUnderlinedFromLogicalToVisualModels(false);
}
impl.mModel->mLogicalModel->mColorRuns.PushBack(colorRun);
//Mark-up processor case
- if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled())
+ if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
+ impl.mModel->mLogicalModel->mUnderlineRunsUpdated)
{
impl.CopyUnderlinedFromLogicalToVisualModels(false);
}
impl.mModel->mLogicalModel->mBackgroundColorRuns.PushBack(backgroundColorRun);
//Mark-up processor case
- if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled())
+ if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
+ impl.mModel->mLogicalModel->mUnderlineRunsUpdated)
{
impl.CopyUnderlinedFromLogicalToVisualModels(false);
}
impl.mModel->mVisualModel->mUnderlineRuns.PushBack(underlineRun);
//Mark-up processor case
- if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled())
+ if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
+ impl.mModel->mLogicalModel->mUnderlineRunsUpdated)
{
impl.CopyUnderlinedFromLogicalToVisualModels(false);
}
impl.mModel->mVisualModel->mUnderlineRuns.PushBack(underlineRun);
//Mark-up processor case
- if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled())
+ if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
+ impl.mModel->mLogicalModel->mUnderlineRunsUpdated)
{
impl.CopyUnderlinedFromLogicalToVisualModels(false);
}
impl.mModel->mVisualModel->mUnderlineRuns.PushBack(underlineRun);
//Mark-up processor case
- if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled())
+ if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
+ impl.mModel->mLogicalModel->mUnderlineRunsUpdated)
{
impl.CopyUnderlinedFromLogicalToVisualModels(false);
}
impl.mModel->mVisualModel->mUnderlineRuns.PushBack(underlineRun);
//Mark-up processor case
- if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled())
+ if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
+ impl.mModel->mLogicalModel->mUnderlineRunsUpdated)
{
impl.CopyUnderlinedFromLogicalToVisualModels(false);
}
(0u != impl.mModel->mVisualModel->mCharactersToGlyph.Count())))
{
//Mark-up processor case
- if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled())
+ if(impl.mModel->mVisualModel->IsMarkupProcessorEnabled() ||
+ impl.mModel->mLogicalModel->mUnderlineRunsUpdated)
{
impl.CopyUnderlinedFromLogicalToVisualModels(true);
impl.CopyStrikethroughFromLogicalToVisualModels();
mModel->mVisualModel->mUnderlineRuns.PushBack(underlineGlyphRun);
}
+
+ // Reset flag. The updates have been applied from logical to visual.
+ mModel->mLogicalModel->mUnderlineRunsUpdated = false;
}
void Controller::Impl::CopyStrikethroughFromLogicalToVisualModels()
LogicalModel::LogicalModel()
: mBidirectionalLineIndex(0u),
- mSpannedTextPlaced(false)
+ mSpannedTextPlaced(false),
+ mUnderlineRunsUpdated(false)
{
}
BidirectionalLineRunIndex mBidirectionalLineIndex; ///< The last fetched bidirectional line info.
bool mSpannedTextPlaced : 1; ///< Whether the spanned-text is placed.
+
+ bool mUnderlineRunsUpdated : 1; /// Whether the UnderlinedCharacterRuns is updated. (Added for SpannedText)
};
} // namespace Text
}
// Markup-Processor for overlay styles
- if(mModel->IsMarkupProcessorEnabled())
+ if(mModel->IsMarkupProcessorEnabled() || mModel->IsSpannedTextPlaced())
{
if(mModel->IsMarkupUnderlineSet())
{
return mModel->IsMarkupProcessorEnabled();
}
+bool ViewModel::IsSpannedTextPlaced() const
+{
+ return mModel->IsSpannedTextPlaced();
+}
+
const GlyphInfo* ViewModel::GetHyphens() const
{
return mModel->GetHyphens();
bool IsMarkupProcessorEnabled() const override;
/**
+ * @copydoc ModelInterface::IsSpannedTextPlaced()
+ */
+ bool IsSpannedTextPlaced() const override;
+
+ /**
* @copydoc ModelInterface::GetHyphens()
*/
const GlyphInfo* GetHyphens() const override;
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/internal/text/spannable/spans/underline-span-impl.h>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/text/color-run.h>
+#include <dali-toolkit/internal/text/markup-tags-and-attributes.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Text
+{
+namespace Internal
+{
+struct UnderlineSpan::Impl
+{
+ UnderlineStyleProperties mUnderlineProperties; ///< The properties of underline style.
+};
+
+UnderlineSpan::UnderlineSpan()
+: BaseSpan()
+{
+ mImpl = std::make_unique<Impl>();
+}
+
+UnderlineSpan ::~UnderlineSpan()
+{
+}
+
+Dali::Toolkit::Text::UnderlineSpan UnderlineSpan::New()
+{
+ UnderlineSpanPtr object = new UnderlineSpan();
+
+ Dali::Toolkit::Text::UnderlineSpan handle = Dali::Toolkit::Text::UnderlineSpan(object.Get());
+
+ return handle;
+}
+
+Dali::Toolkit::Text::UnderlineSpan UnderlineSpan::NewSolid(Vector4 color, float height)
+{
+ UnderlineSpanPtr object = new UnderlineSpan();
+ object->SetType(Text::Underline::SOLID);
+ object->SetColor(color);
+ object->SetHeight(height);
+
+ Dali::Toolkit::Text::UnderlineSpan handle = Dali::Toolkit::Text::UnderlineSpan(object.Get());
+
+ return handle;
+}
+
+Dali::Toolkit::Text::UnderlineSpan UnderlineSpan::NewDashed(Vector4 color, float height, float dashGap, float dashWidth)
+{
+ UnderlineSpanPtr object = new UnderlineSpan();
+ object->SetType(Text::Underline::DASHED);
+ object->SetColor(color);
+ object->SetHeight(height);
+ object->SetDashGap(dashGap);
+ object->SetDashWidth(dashWidth);
+
+ Dali::Toolkit::Text::UnderlineSpan handle = Dali::Toolkit::Text::UnderlineSpan(object.Get());
+
+ return handle;
+}
+
+Dali::Toolkit::Text::UnderlineSpan UnderlineSpan::NewDouble(Vector4 color, float height)
+{
+ UnderlineSpanPtr object = new UnderlineSpan();
+ object->SetType(Text::Underline::DOUBLE);
+ object->SetColor(color);
+ object->SetHeight(height);
+
+ Dali::Toolkit::Text::UnderlineSpan handle = Dali::Toolkit::Text::UnderlineSpan(object.Get());
+
+ return handle;
+}
+
+//Methods
+
+const Text::Underline::Type UnderlineSpan::GetType() const
+{
+ return mImpl->mUnderlineProperties.type;
+}
+
+bool UnderlineSpan::IsTypeDefined() const
+{
+ return mImpl->mUnderlineProperties.typeDefined;
+}
+
+void UnderlineSpan::SetType(const Text::Underline::Type& type)
+{
+ mImpl->mUnderlineProperties.type = type;
+ mImpl->mUnderlineProperties.typeDefined = true;
+}
+
+const Vector4 UnderlineSpan::GetColor() const
+{
+ return mImpl->mUnderlineProperties.color;
+}
+
+bool UnderlineSpan::IsColorDefined() const
+{
+ return mImpl->mUnderlineProperties.colorDefined;
+}
+
+void UnderlineSpan::SetColor(const Vector4& color)
+{
+ mImpl->mUnderlineProperties.color = color;
+ mImpl->mUnderlineProperties.colorDefined = true;
+}
+
+const float UnderlineSpan::GetHeight() const
+{
+ return mImpl->mUnderlineProperties.height;
+}
+
+bool UnderlineSpan::IsHeightDefined() const
+{
+ return mImpl->mUnderlineProperties.heightDefined;
+}
+
+void UnderlineSpan::SetHeight(const float& height)
+{
+ mImpl->mUnderlineProperties.height = height;
+ mImpl->mUnderlineProperties.heightDefined = true;
+}
+
+const float UnderlineSpan::GetDashGap() const
+{
+ return mImpl->mUnderlineProperties.dashGap;
+}
+
+bool UnderlineSpan::IsDashGapDefined() const
+{
+ return mImpl->mUnderlineProperties.dashGapDefined;
+}
+
+void UnderlineSpan::SetDashGap(const float& dashGap)
+{
+ mImpl->mUnderlineProperties.dashGap = dashGap;
+ mImpl->mUnderlineProperties.dashGapDefined = true;
+}
+
+const float UnderlineSpan::GetDashWidth() const
+{
+ return mImpl->mUnderlineProperties.dashWidth;
+}
+
+bool UnderlineSpan::IsDashWidthDefined() const
+{
+ return mImpl->mUnderlineProperties.dashWidthDefined;
+}
+
+void UnderlineSpan::SetDashWidth(const float& dashWidth)
+{
+ mImpl->mUnderlineProperties.dashWidth = dashWidth;
+ mImpl->mUnderlineProperties.dashWidthDefined = true;
+}
+
+void UnderlineSpan::CreateStyleCharacterRun(IntrusivePtr<LogicalModel>& logicalModel, const Dali::Toolkit::Text::Range& range) const
+{
+ UnderlinedCharacterRun underlinedCharacterRun;
+ underlinedCharacterRun.characterRun.characterIndex = range.GetStartIndex();
+ underlinedCharacterRun.characterRun.numberOfCharacters = range.GetNumberOfIndices();
+
+ underlinedCharacterRun.properties = mImpl->mUnderlineProperties;
+ logicalModel->mUnderlinedCharacterRuns.PushBack(underlinedCharacterRun);
+
+ logicalModel->mUnderlineRunsUpdated = true;
+}
+
+} // namespace Internal
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
--- /dev/null
+#ifndef DALI_TOOLKIT_INTERNAL_TEXT_UNDERLINE_SPAN_IMPL_H
+#define DALI_TOOLKIT_INTERNAL_TEXT_UNDERLINE_SPAN_IMPL_H
+
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali-toolkit/devel-api/text/spans/underline-span.h>
+#include <memory>
+
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/text/logical-model-impl.h>
+#include <dali-toolkit/internal/text/spannable/spans/base-span-impl.h>
+#include <dali/public-api/math/vector4.h>
+
+namespace Dali
+{
+namespace Toolkit
+{
+namespace Text
+{
+namespace Internal
+{
+class UnderlineSpan;
+using UnderlineSpanPtr = IntrusivePtr<UnderlineSpan>;
+
+/**
+ * @copydoc Dali::Toolkit::Text::UnderlineSpan
+ */
+class UnderlineSpan : public BaseSpan
+{
+public:
+ /**
+ * @brief Creates a new UnderlineSpan object.
+ *
+ * @return A new UnderlineSpan object.
+ */
+ static Dali::Toolkit::Text::UnderlineSpan New();
+
+ /**
+ * @brief Creates a new UnderlineSpan object.
+ *
+ * @param[in] color The color of line.
+ * @param[in] height The height of line.
+ *
+ * @return A new UnderlineSpan object.
+ */
+ static Dali::Toolkit::Text::UnderlineSpan NewSolid(Vector4 color, float height);
+
+ /**
+ *
+ * @param[in] color The color of line.
+ * @param[in] height The height of line.
+ * @param[in] dashGap The dash-gap of line.
+ * @param[in] dashWidth The dash-width of line.
+ *
+ * @return A new UnderlineSpan object.
+ */
+ static Dali::Toolkit::Text::UnderlineSpan NewDashed(Vector4 color, float height, float dashGap, float dashWidth);
+
+ /**
+ * @brief Creates a new UnderlineSpan object.
+ *
+ * @param[in] color The color of line.
+ * @param[in] height The height of line.
+ *
+ * @return A new UnderlineSpan object.
+ */
+ static Dali::Toolkit::Text::UnderlineSpan NewDouble(Vector4 color, float height);
+
+ /**
+ * Default Constructor
+ */
+ UnderlineSpan();
+
+ UnderlineSpan(const UnderlineSpan&) = delete; ///< Deleted copy constructor
+ UnderlineSpan(UnderlineSpan&&) = delete; ///< Deleted move constructor
+ UnderlineSpan& operator=(const UnderlineSpan&) = delete; ///< Deleted copy assignment operator
+ UnderlineSpan& operator=(UnderlineSpan&&) = delete; ///< Deleted move assignment operator
+
+ /**
+ * @brief Destructor
+ *
+ * A reference counted object may only be deleted by calling Unreference()
+ */
+ ~UnderlineSpan() override;
+
+public: //Methods
+ /**
+ * @copydoc Dali::Toolkit::Text::UnderlineSpan::GetType()
+ */
+ const Text::Underline::Type GetType() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Text::UnderlineSpan::IsTypeDefined()
+ */
+ bool IsTypeDefined() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Text::UnderlineSpan::GetColor()
+ */
+ const Vector4 GetColor() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Text::UnderlineSpan::IsColorDefined()
+ */
+ bool IsColorDefined() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Text::UnderlineSpan::GetHeight()
+ */
+ const float GetHeight() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Text::UnderlineSpan::IsHeightDefined()
+ */
+ bool IsHeightDefined() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Text::UnderlineSpan::GetDashGap()
+ */
+ const float GetDashGap() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Text::UnderlineSpan::IsDashGapDefined()
+ */
+ bool IsDashGapDefined() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Text::UnderlineSpan::GetDashWidth()
+ */
+ const float GetDashWidth() const;
+
+ /**
+ * @copydoc Dali::Toolkit::Text::UnderlineSpan::IsDashWidthDefined()
+ */
+ bool IsDashWidthDefined() const;
+
+public: //Methods. Not intended for application developers
+ /**
+ * @brief Set the type of underline.
+ *
+ * @param[in] type The type of line.
+ */
+ void SetType(const Text::Underline::Type& type);
+
+ /**
+ * @brief Set the color of underline.
+ *
+ * @param[in] color The color of line.
+ */
+ void SetColor(const Vector4& color);
+
+ /**
+ * @brief Set the height of underline.
+ *
+ * @param[in] height The height of line.
+ */
+ void SetHeight(const float& height);
+
+ /**
+ * @brief Set the dash-gap of underline.
+ *
+ * @param[in] dashGap The dash-gap of line.
+ */
+ void SetDashGap(const float& dashGap);
+
+ /**
+ * @brief Set the dash-width of underline.
+ *
+ * @param[in] dashWidth The dash-width of line.
+ */
+ void SetDashWidth(const float& dashWidth);
+
+public: //Methods for internal only
+ /**
+ * @copydoc Dali::Toolkit::Text::BaseSpan::CreateStyleCharacterRun
+ */
+ void CreateStyleCharacterRun(IntrusivePtr<LogicalModel>& logicalModel, const Dali::Toolkit::Text::Range& range) const override;
+
+private:
+ struct Impl;
+ std::unique_ptr<Impl> mImpl{nullptr};
+
+}; // class UnderlineSpan
+
+} // namespace Internal
+
+// Helpers for public-api forwarding methods
+
+inline Internal::UnderlineSpan& GetImplementation(Dali::Toolkit::Text::UnderlineSpan& underlineSpan)
+{
+ DALI_ASSERT_ALWAYS(underlineSpan && "underlineSpan handle is empty");
+
+ BaseObject& object = underlineSpan.GetBaseObject();
+
+ return static_cast<Internal::UnderlineSpan&>(object);
+}
+
+inline const Internal::UnderlineSpan& GetImplementation(const Dali::Toolkit::Text::UnderlineSpan& underlineSpan)
+{
+ DALI_ASSERT_ALWAYS(underlineSpan && "underlineSpan handle is empty");
+
+ const BaseObject& object = underlineSpan.GetBaseObject();
+
+ return static_cast<const Internal::UnderlineSpan&>(object);
+}
+
+} // namespace Text
+
+} // namespace Toolkit
+
+} // namespace Dali
+
+#endif // DALI_TOOLKIT_INTERNAL_TEXT_UNDERLINE_SPAN_IMPL_H
\ No newline at end of file
virtual bool IsMarkupProcessorEnabled() const = 0;
/**
+ * @brief Retrieves whether the spanned-text is placed.
+ *
+ * By default is disabled.
+ *
+ * @return @e true if the spanned-text is placed, otherwise returns @e false.
+ */
+ virtual bool IsSpannedTextPlaced() const = 0;
+
+ /**
* @brief Returns the hyphens glyph info.
*
* @return hyphens glyph info.
return mVisualModel->IsMarkupProcessorEnabled();
}
+bool Model::IsSpannedTextPlaced() const
+{
+ return mLogicalModel->mSpannedTextPlaced;
+}
+
const GlyphInfo* Model::GetHyphens() const
{
return mVisualModel->mHyphen.glyph.Begin();
bool IsMarkupProcessorEnabled() const override;
/**
+ * @copydoc ModelInterface::IsSpannedTextPlaced()
+ */
+ bool IsSpannedTextPlaced() const override;
+
+ /**
* @copydoc ModelInterface::GetHyphens()
*/
const GlyphInfo* GetHyphens() const override;
if(mAnimatedImageLoading)
{
- mImageCache = new RollingAnimatedImageCache(textureManager, mDesiredSize, mFittingMode, mSamplingMode, mAnimatedImageLoading, mMaskingData, *this, mCacheSize, mBatchSize, mWrapModeU, mWrapModeV, IsSynchronousLoadingRequired(), mFactoryCache.GetPreMultiplyOnLoad());
+ mImageCache = new RollingAnimatedImageCache(textureManager, mDesiredSize, mFittingMode, mSamplingMode, mAnimatedImageLoading, mMaskingData, *this, mCacheSize, mBatchSize, mWrapModeU, mWrapModeV, IsSynchronousLoadingRequired(), IsPreMultipliedAlphaEnabled());
}
else if(mImageUrls)
{
uint16_t cacheSize = std::max(std::min(std::max(batchSize, mCacheSize), numUrls), MINIMUM_CACHESIZE);
if(cacheSize < numUrls)
{
- mImageCache = new RollingImageCache(textureManager, mDesiredSize, mFittingMode, mSamplingMode, *mImageUrls, mMaskingData, *this, cacheSize, batchSize, mFrameDelay);
+ mImageCache = new RollingImageCache(textureManager, mDesiredSize, mFittingMode, mSamplingMode, *mImageUrls, mMaskingData, *this, cacheSize, batchSize, mFrameDelay, IsPreMultipliedAlphaEnabled());
}
else
{
- mImageCache = new FixedImageCache(textureManager, mDesiredSize, mFittingMode, mSamplingMode, *mImageUrls, mMaskingData, *this, batchSize, mFrameDelay);
+ mImageCache = new FixedImageCache(textureManager, mDesiredSize, mFittingMode, mSamplingMode, *mImageUrls, mMaskingData, *this, batchSize, mFrameDelay, IsPreMultipliedAlphaEnabled());
}
}
}
}
-void AnimatedImageVisual::FrameReady(TextureSet textureSet, uint32_t interval)
+void AnimatedImageVisual::FrameReady(TextureSet textureSet, uint32_t interval, bool preMultiplied)
{
+ EnablePreMultipliedAlpha(preMultiplied);
+
// When image visual requested to load new frame to mImageCache and it is failed.
if(!mImageCache || !textureSet)
{
* @brief Called when the next frame is ready.
* @param[in] textureSet the texture set to apply
* @param[in] interval interval(ms) for the frame
+ * @param[in] preMultiplied whether the texture is premultied alpha or not.
*/
- void FrameReady(TextureSet textureSet, uint32_t interval) override;
+ void FrameReady(TextureSet textureSet, uint32_t interval, bool preMultiplied) override;
/**
* @brief Display the next frame. It is called when the mFrameDelayTimer ticks.
TextureManager::MaskingDataPointer& maskingData,
ImageCache::FrameReadyObserver& observer,
uint32_t batchSize,
- uint32_t interval)
-: ImageCache(textureManager, size, fittingMode, samplingMode, maskingData, observer, batchSize, interval),
+ uint32_t interval,
+ bool preMultiplyOnLoad)
+: ImageCache(textureManager, size, fittingMode, samplingMode, maskingData, observer, batchSize, interval, preMultiplyOnLoad),
mImageUrls(urlList),
mFront(FIRST_FRAME_INDEX)
{
ImageAtlasManagerPtr imageAtlasManager = nullptr;
Vector4 textureRect;
Dali::ImageDimensions textureRectSize;
- auto preMultiply = TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
- mTextureManager.LoadTexture(url, mDesiredSize, mFittingMode, mSamplingMode, mMaskingData, synchronousLoading, mImageUrls[frameIndex].mTextureId, textureRect, textureRectSize, atlasingStatus, loadingStatus, this, atlasObserver, imageAtlasManager, ENABLE_ORIENTATION_CORRECTION, TextureManager::ReloadPolicy::CACHED, preMultiply);
+ auto preMultiplyOnLoading = mPreMultiplyOnLoad ? TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD
+ : TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
+
+ mTextureManager.LoadTexture(url, mDesiredSize, mFittingMode, mSamplingMode, mMaskingData, synchronousLoading, mImageUrls[frameIndex].mTextureId, textureRect, textureRectSize, atlasingStatus, loadingStatus, this, atlasObserver, imageAtlasManager, ENABLE_ORIENTATION_CORRECTION, TextureManager::ReloadPolicy::CACHED, preMultiplyOnLoading);
mRequestingLoad = false;
}
}
return textureSet;
}
-void FixedImageCache::CheckFrontFrame(bool wasReady)
+void FixedImageCache::CheckFrontFrame(bool wasReady, bool preMultiplied)
{
if(wasReady == false && IsFrontReady())
{
- mObserver.FrameReady(GetFrontTextureSet(), mInterval);
+ mObserver.FrameReady(GetFrontTextureSet(), mInterval, preMultiplied);
}
}
{
mReadyFlags.back() = true;
}
- CheckFrontFrame(frontFrameReady);
+ CheckFrontFrame(frontFrameReady, textureInformation.preMultiplied);
}
else
{
mLoadState = TextureManager::LoadState::LOAD_FAILED;
- mObserver.FrameReady(TextureSet(), 0);
+ // preMultiplied should be false because broken image don't premultiply alpha on load
+ mObserver.FrameReady(TextureSet(), 0, false);
}
}
public:
/**
* Constructor.
- * @param[in] textureManager The texture manager
- * @param[in] size The width and height to fit the loaded image to.
- * @param[in] fittingMode The FittingMode of the resource to load
- * @param[in] samplingMode The SamplingMode of the resource to load
- * @param[in] urlList List of urls to cache
- * @param[in] maskingData Masking data to be applied.
- * @param[in] observer FrameReady observer
- * @param[in] batchSize The size of a batch to load
- * @param[in] interval Time interval between each frame
+ * @param[in] textureManager The texture manager
+ * @param[in] size The width and height to fit the loaded image to.
+ * @param[in] fittingMode The FittingMode of the resource to load
+ * @param[in] samplingMode The SamplingMode of the resource to load
+ * @param[in] urlList List of urls to cache
+ * @param[in] maskingData Masking data to be applied.
+ * @param[in] observer FrameReady observer
+ * @param[in] batchSize The size of a batch to load
+ * @param[in] interval Time interval between each frame
+ * @param[in] preMultiplyOnLoad The flag if image's color should be multiplied by it's alpha
*
* This will start loading textures immediately, according to the
* batch and cache sizes. The cache is as large as the number of urls.
TextureManager::MaskingDataPointer& maskingData,
ImageCache::FrameReadyObserver& observer,
uint32_t batchSize,
- uint32_t interval);
+ uint32_t interval,
+ bool preMultiplyOnLoad);
~FixedImageCache() override;
* @brief Check if the front frame has become ready - if so, inform observer
*
* @param[in] wasReady Readiness before call.
+ * @param[in] preMultiplied whether the texture is premultied alpha or not.
*/
- void CheckFrontFrame(bool wasReady);
+ void CheckFrontFrame(bool wasReady, bool preMultiplied);
protected:
/**
TextureManager::MaskingDataPointer& maskingData,
ImageCache::FrameReadyObserver& observer,
uint32_t batchSize,
- uint32_t interval)
+ uint32_t interval,
+ bool preMultiplyOnLoad)
: mTextureManager(textureManager),
mObserver(observer),
mMaskingData(maskingData),
mInterval(interval),
mLoadState(TextureManager::LoadState::NOT_STARTED),
mRequestingLoad(false),
+ mPreMultiplyOnLoad(preMultiplyOnLoad),
mTextureManagerAlive(true)
{
mTextureManager.AddObserver(*this);
* @brief Informs observer when the next texture set is ready to display
* @param[in] textureSet The ready texture set
* @param[in] interval interval(ms) for the frame
+ * @param[in] preMultiplied whether the texture is premultied alpha or not.
*/
- virtual void FrameReady(TextureSet textureSet, uint32_t interval) = 0;
+ virtual void FrameReady(TextureSet textureSet, uint32_t interval, bool preMultiplied) = 0;
};
struct UrlStore
public:
/**
* @brief Constructor.
- * @param[in] textureManager The texture manager
- * @param[in] size The width and height to fit the loaded image to.
- * @param[in] fittingMode The FittingMode of the resource to load
- * @param[in] samplingMode The SamplingMode of the resource to load
- * @param[in] observer FrameReady observer
- * @param[in] maskingData Masking data to be applied.
- * @param[in] batchSize The size of a batch to load
- * @param[in] interval Time interval(ms) between each frame
+ * @param[in] textureManager The texture manager
+ * @param[in] size The width and height to fit the loaded image to.
+ * @param[in] fittingMode The FittingMode of the resource to load
+ * @param[in] samplingMode The SamplingMode of the resource to load
+ * @param[in] observer FrameReady observer
+ * @param[in] maskingData Masking data to be applied.
+ * @param[in] batchSize The size of a batch to load
+ * @param[in] interval Time interval(ms) between each frame
+ * @param[in] preMultiplyOnLoad The flag if image's color should be multiplied by it's alpha
*
* This will start loading textures immediately, according to the
* batch and cache sizes. The cache is as large as the number of urls.
TextureManager::MaskingDataPointer& maskingData,
ImageCache::FrameReadyObserver& observer,
uint32_t batchSize,
- uint32_t interval);
+ uint32_t interval,
+ bool preMultiplyOnLoad);
virtual ~ImageCache();
uint32_t mInterval;
TextureManager::LoadState mLoadState;
bool mRequestingLoad : 1;
+ bool mPreMultiplyOnLoad : 1;
bool mTextureManagerAlive : 1;
};
const Dali::WrapMode::Type& wrapModeV,
bool isSynchronousLoading,
bool preMultiplyOnLoad)
-: ImageCache(textureManager, size, fittingMode, samplingMode, maskingData, observer, batchSize, 0u),
+: ImageCache(textureManager, size, fittingMode, samplingMode, maskingData, observer, batchSize, 0u, preMultiplyOnLoad),
mImageUrl(animatedImageLoading.GetUrl()),
mAnimatedImageLoading(animatedImageLoading),
mFrameCount(SINGLE_IMAGE_COUNT),
mQueue(cacheSize),
mWrapModeU(wrapModeU),
mWrapModeV(wrapModeV),
- mIsSynchronousLoading(isSynchronousLoading),
- mPreMultiplyOnLoad(preMultiplyOnLoad)
+ mIsSynchronousLoading(isSynchronousLoading)
{
mTextureIds.resize(mFrameCount);
mIntervals.assign(mFrameCount, 0);
bool synchronouslyLoaded = false;
if(mIsSynchronousLoading && mQueue.IsEmpty())
{
- textureSet = RequestFrameLoading(frameIndex, true);
+ auto preMultiplyOnLoading = mPreMultiplyOnLoad ? TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD
+ : TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
+
+ textureSet = RequestFrameLoading(frameIndex, true, preMultiplyOnLoading);
batchFrameIndex = (frameIndex + 1) % mFrameCount;
uint32_t interval = 0u;
if(textureSet)
synchronouslyLoaded = true;
interval = mAnimatedImageLoading.GetFrameInterval(mQueue.Back().mFrameNumber);
}
- MakeFrameReady(synchronouslyLoaded, textureSet, interval);
+ MakeFrameReady(synchronouslyLoaded, textureSet, interval, preMultiplyOnLoading == TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD);
}
if(popExist || mQueue.IsEmpty() || synchronouslyLoaded)
return (!mQueue.IsEmpty() && mQueue.Front().mReady);
}
-TextureSet RollingAnimatedImageCache::RequestFrameLoading(uint32_t frameIndex, bool synchronousLoading)
+TextureSet RollingAnimatedImageCache::RequestFrameLoading(uint32_t frameIndex)
+{
+ auto preMultiplyOnLoading = mPreMultiplyOnLoad ? TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD
+ : TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
+
+ return RequestFrameLoading(frameIndex, false, preMultiplyOnLoading);
+}
+
+TextureSet RollingAnimatedImageCache::RequestFrameLoading(uint32_t frameIndex, bool synchronousLoading, TextureManager::MultiplyOnLoad& preMultiplyOnLoading)
{
ImageFrame imageFrame;
imageFrame.mFrameNumber = frameIndex;
mLoadState = TextureManager::LoadState::LOADING;
- auto preMultiplyOnLoading = mPreMultiplyOnLoad ? TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD
- : TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
-
TextureManager::TextureId loadTextureId = TextureManager::INVALID_TEXTURE_ID;
TextureSet textureSet = mTextureManager.LoadAnimatedImageTexture(mImageUrl,
mAnimatedImageLoading,
{
if(mLoadState != TextureManager::LoadState::LOADING)
{
- RequestFrameLoading(frameIndex, false);
+ RequestFrameLoading(frameIndex);
}
else
{
mLoadState = TextureManager::LoadState::NOT_STARTED;
}
-void RollingAnimatedImageCache::MakeFrameReady(bool loadSuccess, TextureSet textureSet, uint32_t interval)
+void RollingAnimatedImageCache::MakeFrameReady(bool loadSuccess, TextureSet textureSet, uint32_t interval, bool preMultiplied)
{
if(!loadSuccess)
{
mLoadState = TextureManager::LoadState::LOAD_FAILED;
- mObserver.FrameReady(TextureSet(), 0);
+ // preMultiplied should be false because broken image don't premultiply alpha on load
+ mObserver.FrameReady(TextureSet(), 0, false);
}
else
{
// If it is, notify frame ready to observer.
if(frontFrameReady == false && IsFrontReady())
{
- mObserver.FrameReady(textureSet, interval);
+ mObserver.FrameReady(textureSet, interval, preMultiplied);
}
}
}
textureInformation.textureSet.SetSampler(0u, sampler);
}
- MakeFrameReady(loadSuccess, textureInformation.textureSet, textureInformation.interval);
+ MakeFrameReady(loadSuccess, textureInformation.textureSet, textureInformation.interval, textureInformation.preMultiplied);
if(loadSuccess)
{
{
uint32_t loadingIndex = mLoadWaitingQueue.front();
mLoadWaitingQueue.erase(mLoadWaitingQueue.begin());
- RequestFrameLoading(loadingIndex, false);
+ RequestFrameLoading(loadingIndex);
}
else if(mQueue.Count() == 1u && textureInformation.frameCount > SINGLE_IMAGE_COUNT)
{
bool IsFrontReady() const;
/**
+ * @brief Request to Load a frame asynchronously
+ *
+ * @param[in] frameIndex index of frame to be loaded.
+ *
+ * @return the texture set currently loaded.
+ */
+ TextureSet RequestFrameLoading(uint32_t frameIndex);
+
+ /**
* @brief Request to Load a frame
*
- * @param[in] frameIndex index of frame to be loaded.
- * @param[in] synchronousLoading true if the frame should be loaded synchronously
+ * @param[in] frameIndex Index of frame to be loaded.
+ * @param[in] synchronousLoading True if the frame should be loaded synchronously
+ * @param[in,out] preMultiplyOnLoad True if the image color should be multiplied by it's alpha. Set to false if the
+ * image has no alpha channel
*
* @return the texture set currently loaded.
*/
- TextureSet RequestFrameLoading(uint32_t frameIndex, bool synchronousLoading);
+ TextureSet RequestFrameLoading(uint32_t frameIndex, bool synchronousLoading, TextureManager::MultiplyOnLoad& preMultiplyOnLoading);
/**
* @brief Load the next batch of images
* @param[in] loadSuccess whether the loading is succeded or not.
* @param[in] textureSet textureSet for this frame.
* @param[in] interval interval between this frame and next frame.
+ * @param[in] preMultiplied whether the texture is premultied alpha or not.
*/
- void MakeFrameReady(bool loadSuccess, TextureSet textureSet, uint32_t interval);
+ void MakeFrameReady(bool loadSuccess, TextureSet textureSet, uint32_t interval, bool preMultiplied);
/**
* @brief Pop front entity of Cache.
Dali::WrapMode::Type mWrapModeU : 3;
Dali::WrapMode::Type mWrapModeV : 3;
bool mIsSynchronousLoading;
- bool mPreMultiplyOnLoad;
};
} // namespace Internal
ImageCache::FrameReadyObserver& observer,
uint16_t cacheSize,
uint16_t batchSize,
- uint32_t interval)
-: ImageCache(textureManager, size, fittingMode, samplingMode, maskingData, observer, batchSize, interval),
+ uint32_t interval,
+ bool preMultiplyOnLoad)
+: ImageCache(textureManager, size, fittingMode, samplingMode, maskingData, observer, batchSize, interval, preMultiplyOnLoad),
mImageUrls(urlList),
mQueue(cacheSize)
{
ImageAtlasManagerPtr imageAtlasManager = nullptr;
Vector4 textureRect;
Dali::ImageDimensions textureRectSize;
- auto preMultiply = TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
+
+ auto preMultiplyOnLoading = mPreMultiplyOnLoad ? TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD
+ : TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
TextureManager::TextureId loadTextureId = TextureManager::INVALID_TEXTURE_ID;
TextureSet textureSet = mTextureManager.LoadTexture(
- url, mDesiredSize, mFittingMode, mSamplingMode, mMaskingData, synchronousLoading, loadTextureId, textureRect, textureRectSize, atlasingStatus, loadingStatus, this, atlasObserver, imageAtlasManager, ENABLE_ORIENTATION_CORRECTION, TextureManager::ReloadPolicy::CACHED, preMultiply);
+ url, mDesiredSize, mFittingMode, mSamplingMode, mMaskingData, synchronousLoading, loadTextureId, textureRect, textureRectSize, atlasingStatus, loadingStatus, this, atlasObserver, imageAtlasManager, ENABLE_ORIENTATION_CORRECTION, TextureManager::ReloadPolicy::CACHED, preMultiplyOnLoading);
mImageUrls[imageFrame.mUrlIndex].mTextureId = loadTextureId;
mRequestingLoad = false;
sampler.SetWrapMode(Dali::WrapMode::Type::DEFAULT, Dali::WrapMode::Type::DEFAULT);
textureInformation.textureSet.SetSampler(0u, sampler);
}
- mObserver.FrameReady(textureInformation.textureSet, mInterval);
+ mObserver.FrameReady(textureInformation.textureSet, mInterval, textureInformation.preMultiplied);
}
}
else
{
mLoadState = TextureManager::LoadState::LOAD_FAILED;
- mObserver.FrameReady(TextureSet(), 0);
+ // preMultiplied should be false because broken image don't premultiply alpha on load
+ mObserver.FrameReady(TextureSet(), 0, false);
}
LOG_CACHE;
public:
/**
* Constructor.
- * @param[in] textureManager The texture manager
- * @param[in] size The width and height to fit the loaded image to.
- * @param[in] fittingMode The FittingMode of the resource to load
- * @param[in] samplingMode The SamplingMode of the resource to load
- * @param[in] urlList List of urls to cache
- * @param[in] maskingData Masking data to be applied.
- * @param[in] observer FrameReady observer
- * @param[in] cacheSize The size of the cache
- * @param[in] batchSize The size of a batch to load
- * @param[in] interval Time interval between each frame
+ * @param[in] textureManager The texture manager
+ * @param[in] size The width and height to fit the loaded image to.
+ * @param[in] fittingMode The FittingMode of the resource to load
+ * @param[in] samplingMode The SamplingMode of the resource to load
+ * @param[in] urlList List of urls to cache
+ * @param[in] maskingData Masking data to be applied.
+ * @param[in] observer FrameReady observer
+ * @param[in] cacheSize The size of the cache
+ * @param[in] batchSize The size of a batch to load
+ * @param[in] interval Time interval between each frame
+ * @param[in] preMultiplyOnLoad The flag if image's color should be multiplied by it's alpha
*
* This will start loading textures immediately, according to the
* batch and cache sizes.
ImageCache::FrameReadyObserver& observer,
uint16_t cacheSize,
uint16_t batchSize,
- uint32_t interval);
+ uint32_t interval,
+ bool preMultiplyOnLoad);
/**
* Destructor
const bool outlineEnabled = (mController->GetTextModel()->GetOutlineWidth() > Math::MACHINE_EPSILON_1);
const bool backgroundEnabled = mController->GetTextModel()->IsBackgroundEnabled();
- const bool markupProcessorEnabled = mController->IsMarkupProcessorEnabled();
- const bool markupUnderlineEnabled = markupProcessorEnabled && mController->GetTextModel()->IsMarkupUnderlineSet();
- const bool markupStrikethroughEnabled = markupProcessorEnabled && mController->GetTextModel()->IsMarkupStrikethroughSet();
+ const bool markupOrSpannedText = mController->IsMarkupProcessorEnabled() || mController->GetTextModel()->IsSpannedTextPlaced();
+ const bool markupUnderlineEnabled = markupOrSpannedText && mController->GetTextModel()->IsMarkupUnderlineSet();
+ const bool markupStrikethroughEnabled = markupOrSpannedText && mController->GetTextModel()->IsMarkupStrikethroughSet();
const bool underlineEnabled = mController->GetTextModel()->IsUnderlineEnabled() || markupUnderlineEnabled;
const bool strikethroughEnabled = mController->GetTextModel()->IsStrikethroughEnabled() || markupStrikethroughEnabled;
- const bool styleEnabled = (shadowEnabled || outlineEnabled || backgroundEnabled || markupProcessorEnabled);
+ const bool styleEnabled = (shadowEnabled || outlineEnabled || backgroundEnabled || markupOrSpannedText);
const bool isOverlayStyle = underlineEnabled || strikethroughEnabled;
AddRenderer(control, relayoutSize, hasMultipleTextColors, containsColorGlyph, styleEnabled, isOverlayStyle);