//////////////////////////////////////////////////////////////////////////////////////////////////// // NoesisGUI - http://www.noesisengine.com // Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved. //////////////////////////////////////////////////////////////////////////////////////////////////// #ifndef __GUI_POLYBEZIERSEGMENT_H__ #define __GUI_POLYBEZIERSEGMENT_H__ #include #include #include namespace Noesis { struct Point; struct NotifyCollectionChangedEventArgs; template class BoxedFreezableCollection; typedef BoxedFreezableCollection PointCollection; //////////////////////////////////////////////////////////////////////////////////////////////////// /// Represents one or more cubic Bezier curves. /// /// https://docs.microsoft.com/en-us/dotnet/api/system.windows.media.polybeziersegment //////////////////////////////////////////////////////////////////////////////////////////////////// class NS_GUI_CORE_API PolyBezierSegment: public PathSegment { public: PolyBezierSegment (); PolyBezierSegment(const Point* points, uint32_t numPoints, bool isStroked); ~PolyBezierSegment(); /// Gets or sets the end point of the line segment. //@{ PointCollection* GetPoints() const; void SetPoints(PointCollection* points); //@} /// Adds this PolyBezierSegment to the path void BuildPath(BaseVector& commands) override; // Hides Freezable methods for convenience //@{ Ptr Clone() const; Ptr CloneCurrentValue() const; //@} /// From BaseObject //@{ String ToString() const override; //@} public: static const DependencyProperty* PointsProperty; protected: /// From Freezable //@{ Ptr CreateInstanceCore() const override; //@} private: void OnPointsCollectionChanged(BaseComponent* s, const NotifyCollectionChangedEventArgs& e); NS_DECLARE_REFLECTION(PolyBezierSegment, PathSegment) }; } #endif