Migration guides¶
Use these migration guides to update Kanzi applications that use Kanzi Shapes.
1.0.0-beta2¶
In the Rectangle nodes, deprecated the Corner Radius Vector2 property and introduced the Corner Radius float property. Kanzi Studio now shows the Corner Radius Vector2 property as Corner Radius (deprecated).
To update your Kanzi Studio project, in all nodes that use the Corner Radius (deprecated) property, remove that property and set the Corner Radius property. If the Corner Radius (deprecated) property had different values for the x and y radiuses, you also need to set the Corner Aspect Ratio property.
For example, if the value of the Corner Radius (deprecated) property was (10, 20), set:
Corner Radius to 20
Corner Aspect Ratio to 0.5
Renamed the Oval nodes to Ellipse. In all metaclass and property names, replaced “Oval” with “Ellipse”.
For example:
Replaced the
Oval2D
class withEllipse2D
.Replaced the
OvalConcept::WidthProperty
withEllipseConcept::WidthProperty
.
Other changes in the Kanzi Shapes API:
Introduced the
GradientBrush
class. TheLinearGradientBrush
,RadialGradientBrush
, andSweepGradientBrush
classes now derive fromGradientBrush
.Introduced these functions:
PaintManager::acquireGradientTexture()
ShapeVisual3D::invalidatePaint()
In
gradient.hpp
,createGradientTexture()
andgetGradientInfo()
In
paint.hpp
,calculatePaintInfo()
Removed the
PaintManager::validateTexturing()
function. UsecalculatePaintInfo()
,getGradientInfo()
, andPaintManager::acquireGradientTexture()
instead.
1.0.0-beta1¶
Renamed the Kanzi Shapes plugin from Vector Shapes to Shapes:
Changed the name of the Kanzi Engine plugin from kzvectorshapes to kzshapes.
Replaced the
kanzi_vector_shapes
namespace withkanzi::plugin::shapes
.Changed the namespace of metaclasses from
VectorShapes
toKanzi.Shapes
.For example,
Kanzi.Shapes.Oval2D
.Changed the namespace of properties from
<MetaclassName>
toShapes.<MetaclassName>
.For example,
Shapes.OvalConcept.Width
.In method, class, and other API names, replaced all references to
Vector Shapes
withShapes
.Changed the directory structure of the header files from
vector_shapes/
tokanzi/plugin/shapes/
.
Other changes in the Kanzi Shapes API:
Moved common APIs to new concept base classes.
ShapeVisual2D
now inherits fromShapeRenderer
.Renamed
VectorShape2D::createVectorShapeVisualOverride()
toShapeConcept::createRenderer()
.Renamed
getPath()
andsetPath()
togetShapePath()
andsetShapePath()
.Moved
CompositeShapeVisual2D::updateVisualEntry()
to theCompositeShapeVisualConcept
class and introduced thestrokeScale
parameter.Moved the
CompositeShapeVisual2D::VisualEntry
structure to theCompositeShapeVisualConcept
class and introduced thestrokeScale
member.