# CGI Studio 3.6

Release Date: June 2018

# Candera 3.6

To keep backwards compatibility for any interface change in the public API the old interface has been kept and marked as deprecated. The deprecated interfaces will be removed in future versions. Compiler warnings will be generated when using a deprecated interface through the usage of Candera Macro CANDERA\_DEPRECATED\_3\_6\_0.

# Candera/FeatStd CMake Build System Changes

Added flags:

<div class="contents" id="bkmrk-name-description-pos"><div class="contents"><div class="textblock"><table border="1" cellpadding="5" cellspacing="0" style="width: 100%;"><tbody><tr bgcolor="#d4d4d4"><td class="align-center" style="width: 44.7442%;">**Name**</td><td class="align-center" style="width: 44.131%;">**Description**</td><td class="align-center" style="width: 11.1248%;">**Possible values**</td></tr><tr><td style="width: 44.7442%;">CANDERA\_TEXTENGINE\_NATIVE\_LINEHEIGHT\_ENABLED</td><td style="width: 44.131%;">Enables the native line height metrics of the font engine. If disabled then 120% of EM size is applied as line height which is compatible with Adobe.</td><td style="width: 11.1248%;">ON/OFF</td></tr></tbody></table>

---

</div></div></div>

# Candera Engine 2D

#### Node2d GetComputedBoundingRectangle, IsInsideBoundingRectangle, IsPickIntersectingBoundingRectangle and GetEffectiveBoundingRectangle interface extended

The method 'virtual void Node2d::GetComputedBoundingRectangle([Rectangle](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_rectangle.html "Represents a rectangle.")&amp; boundingRectangle, bool ignoreInvisible = false) const' has been extended by the additional parameter ignoreInvisible. The default value of this parameter is false for full usage backwards compatibility. If the parameter is set to true only visible parts of the scene will be considered. This also means that clipped areas are not considered for picking and/or bounding box calculations. As a consequence it is now possible to pick only visible parts of the scene.

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Pivot point for Transformable2D

New methods to [Transformable2D](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_transformable2_d.html "Defines common methods for manipulating node and texture transformations in local coordinate space (o...") have been added that allow to manipulate the real pivot point. Those are [Transformable2D::SetPivotPoint](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_transformable2_d.html#a99ea052896f7f67537676a574631fffa) and [Transformable2D::GetPivotPoint](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_transformable2_d.html#a4324d5a75b09667adb6ef56c91def551) .

---

# Candera Engine 3D

#### Generic Transform is Optional

The Property "Generic Transform" of a 3D [Node](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_node.html "The class Node is an abstract base class for all scene graph nodes. Each Node defines a local coordin...") became optional. The reason for that is to have as few matrix multipilcations as possible which saves performance. Further wise Generic Transforms are only used for special needs.

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Pivot point for Transformable

New methods to [Transformable](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_transformable.html "Defines common methods for manipulating node and texture transformations in local coordinate space (o...") have been added that allow to manipulate the real pivot point. Those are [Transformable::SetPivotPoint](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_transformable.html#a7a885bce1ab6cff4e26882759d1377ae) and [Transformable::GetPivotPoint](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_transformable.html#a8e7479a1a7cbb992d901e9db8454f550) .

---

# Transitions

#### Sequential Transitions - Extended Hint Constructor

The constructor for Transition Hints has been extended in order to reflect the newly added ability to execute Transitions in a sequential manner.

The added parameters are:

```
    const <a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_optional.html">FeatStd::Optional<FragmentStrategy></a>& activationStrategy
    const <a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_optional.html">FeatStd::Optional<FragmentStrategy></a>& deactivationStrategy
    const <a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_optional.html">FeatStd::Optional<Float></a>& activationDelay
    const <a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_optional.html">FeatStd::Optional<Float></a>& deactivationDelay
```

FragmentStrategy is a new enum type consisting of:

<div class="contents" id="bkmrk-normal-early-late"><div class="contents"><div class="textblock">- Normal
- Early
- Late

---

</div></div></div>#### Transition Rules - Check if Rule is Bidirectional

The Rule class has a new method called bool Rule::IsBidirectional() const, which returns, whether the Transition Rule is set to be bidirectional or not.

---

# Textengine

#### AssetFontStore support for Freetype streams

[AssetFontStore](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_asset_font_store.html "implements a font store for the asset library this is the default font store Candera will use to retr...") is extended to support two font load strategies:

<div class="contents" id="bkmrk-assetfontstore%3A%3Aload"><div class="contents"><div class="textblock">- [AssetFontStore::LoadStrategySelector::PreloadStrategy](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_asset_font_store_1_1_load_strategy_selector.html#a3c06cdd0709312d8b0ac60035c9a3b62aad010b9a2098e4e40ff1f0be8f31ba4b "Load the entire font data into memory if it is not already in a direct addressable asset repository...") (the old behavior before the extension): entire fonts are loaded into memory once and font data is accessed from there by Text Engine.
- [AssetFontStore::LoadStrategySelector::OnRequestLoadStrategy](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_asset_font_store_1_1_load_strategy_selector.html#a3c06cdd0709312d8b0ac60035c9a3b62abddf5927381d24532b5a902fda7d33f3 "Do not load anything in memory, but read/copy data into smaller temporary buffers as requested by Fre...") (new behavior, selectable through a strategy selector): small font portions are streamed directly from the asset repository when Freetype (or indirectly Harfbuzz) needs them.

</div></div></div>Use [DefaultLoadStrategySelector::SetDefaultFontLoadStrategy](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_default_load_strategy_selector.html#a340dda8ac0dfb937a3d77d68817bfd48) to select one of these load strategies. Use [DefaultLoadStrategySelector::SetDefaultFontLoadStrategyExceptionList](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_default_load_strategy_selector.html#ac9e45f0d804d98677032b463b50b3513) to exclude a list of fonts from the selected font load strategy.

Example:

```
    // Load fonts with OnRequestLoadStrategy
    selector.SetDefaultFontLoadStrategy(<a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_asset_font_store_1_1_load_strategy_selector.html#a3c06cdd0709312d8b0ac60035c9a3b62abddf5927381d24532b5a902fda7d33f3" title="Do not load anything in memory, but read/copy data into smaller temporary buffers as requested by Fre...">Candera::AssetFontStore::LoadStrategySelector::OnRequestLoadStrategy</a>);
    // "Bitstream Vera Sans" font shall be loaded with PreloadStrategy:
    const Char* g_fontName[2] = { "ConstructionKit##ConstructionKit#Resources#Fonts#Bitstream Vera Sans", 0 };
    selector.SetDefaultFontLoadStrategyExceptionList(g_fontName);
    fontStore.SetLoadStrategySelector(&selector);
```

[Courier](http://dev.doc.cgistudio.at/APILINK/namespace_courier.html) applications can use [Courier::ViewHandler::SetFontStoreProviderCallback](http://dev.doc.cgistudio.at/APILINK/class_courier_1_1_view_handler.html#a7747f74f80b57fd376b13f942d927009) to provide specific settings for the [Candera::AssetFontStore](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_asset_font_store.html "implements a font store for the asset library this is the default font store Candera will use to retr...") in use.

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Support of Monotype's WorldType-Shaper

[Candera](http://dev.doc.cgistudio.at/APILINK/namespace_candera.html "[DataBinding_RefTypeSample]") supports the WorldType-Shaper of Monotype now. The integration is done to support the font engine 'iType'. With this release complex texts can be shaped. The behavior is similar to HarfBuzz with the difference of a huge performance boost. WT-Shaper may have a higher memory consumtion as a trade-off to performance. The implementation concept is aligned with HarfBuzz to support a flexible exchangeability.

With this the default shaper of iType switches from ComplexScript to WT-Shaper. The corresponding CMake flag CANDERA\_TEXTSHAPER has been extended by the entry WorldType-Shaper.

---

# Courier V3.6

## <a class="anchor" id="bkmrk-"></a>Data Context

Support for a [Candera](http://dev.doc.cgistudio.at/APILINK/namespace_candera.html "[DataBinding_RefTypeSample]") node 2D/3D based local data context for binding sources. Behavior/widget property bindings will be bound to the nearest binding source instead of the global binding source from the model. This enables:

<div class="contents" id="bkmrk-the-usage-of-courier"><div class="contents"><div class="textblock">- The usage of courier data binding within different contexts (e.g. each item of a list can act as a binding source for controls).
- Using standard [Courier](http://dev.doc.cgistudio.at/APILINK/namespace_courier.html) data binding for data items within list items.

</div></div></div>#### Data Context Item

Each binding source can be marked as a Data Context Item by setting the flag dataContextItem to true. As a result the binding source data struct will be derived from the Data Context Item base class. Data Context Items can be handled with shared pointers. However, they will be cloned automatically when they are used as a list item. this ensures that there is no need to add synchronization handling in the view. The cloning is only performed on the struct. Each member will be cloned by using its copy constructor. If this results in a shallow copy (e.g. like for other shared pointers, reference, pointers, ...) then the instance is shared between the model and the view. Synchronization handling has to be considered within the application code for those items. The Data Context Item also enables the binding to generic lists with items of different dynamic data type (e.g. for inhomogeneous lists).

#### Courier List model improvements

The list model has been improved:

<div class="contents" id="bkmrk-dynamic-list-fragmen"><div class="contents"><div class="textblock">- Dynamic list fragment: If no maximum and no window size is given in the xml specification then the list fragment will use a dynamic fragment size with variable maximum length.
- No need to provide a maximum size for list fragment: If a window size is given in the xml specification then no maximum size has to be provided (which also had been ignored in the past in that case).
- Modified flags for list items: In addition to the single modified event approach the list model interface (including list fragments) provide a set of modified flags to enable a single update message whenever several list items are modified (e.g content or position). All flags will be reset after the update message of the binding source is sent.
- Automatic setting of list item modified flag: Whenever a list item is modified with the list model interface its modified flag is set in the modified flag set.
- Manual modified flag handling of list items: To handle false positives of modified flags an interface is available to reset the modified flag manually.
- Modification of data item within a data context: To enable the notification of the model of data item change request within a local data context binding source (e.g. a single data item within a list item has to be changes to a specific value) the UpdateModelMsg has been extended by the ChangeDataItem request. This allows the modification of list content with the highest possible precision simply with standard [Courier](http://dev.doc.cgistudio.at/APILINK/namespace_courier.html) data binding.

---

</div></div></div>

# FeatStd 3.6

# FeatStd Util

<span style="color: rgb(34, 34, 34); font-size: 1.666em; font-weight: 400;">Variant explicit constructor</span>

The [Variant](http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_variant.html) constructor have been changed from conversion constructor to explicit constructor. Assignment similar to the following will no longer compile:

```
<a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_variant.html">FeatStd::Variant</a> variant = 1;
```

Furthermore, the direct usage of values (e.g. Int values) as paremeters will no longer compile:

```
<a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_optional.html">FeatStd::Optional<FeatStd::Variant></a> optionalVariant = <a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_optional.html">FeatStd::Optional<FeatStd::Variant></a>(1)
```

Since the constructor is no longer inserted automatically by the compiler it has to be inserted manually to make

```
<a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_variant.html">FeatStd::Variant</a> variant = <a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_variant.html">FeatStd::Variant</a>(1);
<a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_optional.html">FeatStd::Optional<FeatStd::Variant></a> optionalVariant = <a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_optional.html">FeatStd::Optional<FeatStd::Variant></a>(<a class="code" href="http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_variant.html">FeatStd::Variant</a>(1));
```

the code compile again:

<div class="contents" id="bkmrk-"><div class="contents"><div class="textblock">---

</div></div></div>#### Variant explicit constructor

The list of supported types that a [FeatStd::Variant](http://dev.doc.cgistudio.at/APILINK/class_feat_std_1_1_variant.html) can handle has been extended. Beside the converting getter methods also TryGet methods are provided that will indicate if the, conversion was limited by the value range of the result type (e.g. a value 256 converted to a UInt8 will result in the value 255 due to the range limit of UInt8).

---

# SceneComposer 3.6

#### New Feature

Description of New Feature

---