# Candera Engine 2D

#### 2D Node Render Benchmark Property

New methods have been added for getting/setting of render measure value of [Node2D](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_node2_d.html "The class Node2D is an abstract base class for all 2D scene graph nodes."): [Node2D::SetRenderBenchmark](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_node2_d.html#a90f229b2b18275b21ed1e87ba3cb3fd3) and [Node2D::GetRenderBenchmark](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_node2_d.html#aeb4d7e3764ab886e1b65c8c3fe5c01be). These values are used by a camera render strategy and the rendering of the nodes is done until the sum of these render benchmark values exceed a defined threshold.

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

</div></div></div>#### Renderer2DListener Camera Hook

A new hook is defined for [Renderer2DListener](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_renderer2_d_listener.html "A Renderer2DListener defines hooks that are called before and after a Node is rendered.") - [Renderer2DListener::OnCameraPostRender](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_renderer2_d_listener.html#a141a35238594252d9c3f80b8f131ad7e) that is called after a camera has been rendered.

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

</div></div></div>#### GridLayouter Cell Spanning

A new feature has been added to [GridLayouter](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_grid_layouter.html "GridLayouter arranges its elements in a grid. The amount of rows and columns for the grid must be spe...") that allows merging of adjacent columns and/or rows into larger single cells. Two new properties are defined in this case for each element inside a [GridLayouter](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_grid_layouter.html "GridLayouter arranges its elements in a grid. The amount of rows and columns for the grid must be spe..."), **RowSpan** and **ColumnSpan**, which can be accessed by corresponding getter/setter methods: [GridLayouter::SetRowSpan](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_grid_layouter.html#aa9faa97b01d2b51e73b8d81f2edd3857), [GridLayouter::GetRowSpan](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_grid_layouter.html#a8b41b6d564eb8d8417ba318bcbd1f073) and respectively [GridLayouter::SetColumnSpan](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_grid_layouter.html#a2ad9c7c394035fada0198a0981b8ee54), [GridLayouter::GetColumnSpan](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_grid_layouter.html#a52a7e7f858439fa7db55c958578a19b6).

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

</div></div></div>#### 2D Scene Graph support

CGIAnalyzer supports 2D [Scene](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_scene.html "The class Scene represents a top level scene graph node. Multiple Scenes are allowed. A Scene can not be part of any other Scene. To render a Scene, at least one Camera must be part of this Scene and the Camera must have rendering enabled. A Scene can have more than one Camera. Note: Lights added to a Scene apply for that Scene only and do not affect 3D objects in any other Scene.") Graphs now.

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

</div></div></div>#### BitmapImage2D::MemoryPool changed

Enumeration values available for [BitmapImage2D::MemoryPool](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_bitmap_image2_d.html#aa0f832d09bd521bdf64f34831155fa5c) have been modified to BitmapImage2D::MemoryPool::VideoMemory and BitmapImage2D::MemoryPool::ClientMemory. The previous values SystemMemory and FlashMemory are now deprecated.

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

</div></div></div>#### Node2D::LayoutingRectangle deprecated

The dynamic property Node2D::LayoutingRectangle has been deprecated. The only use for this parameter was to allow layouting of text in a uniform way with images. This was made obsolete by the introduction of [TextNode2DLayouter](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_text_node2_d_layouter.html "Base Layouter for TextNode2D nodes."). The funcitonality introduced by this property has been moved to the layouter, as follows:

For controlling the size of the layout rectangle, one shall use the dynamic property Node2D::Size (accessible via [Layouter](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_layouter.html "A non-zero padding applies space inside the element layout's width and height. The values can be set ...")::\*Size\*) For controlling the position of the layout rectangle, one shall use the dynamic property Node2D::Margin (accessible via [Layouter](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_layouter.html "A non-zero padding applies space inside the element layout's width and height. The values can be set ...")::\*Margin\*) For computing the layout rectangle, a generic interface is available as Layouter::GetComputedLayoutRectangle. This is also available in a non-generic flavour as: [Node2D::GetComputedBoundingRectangle](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_node2_d.html#a47334bfe51bb9a7289994087195f3fb4) for nodes that don't display text and [TextNode2D::GetLayoutTextRectangle](http://dev.doc.cgistudio.at/APILINK/class_candera_1_1_text_node2_d.html#a08ea9bb95c74eaba7f7ef28132f35384) for text.

---