Re: Rendering curves
Posted: 14 Feb 2014, 16:11
Is there a sample/C++ example that derives and uses this approach?Having said that, and sorry for posting several times, I am thinking that probably you could extend noesisGUI creating a new class that derives from UIElement and implement the OnRender method.
DrawingContext offers a lot more flexibility for drawing:Code: Select allvoid OnRender(DrawingContext* context);
Code: Select allclass DrawingContext { /// Draws an ellipse void DrawEllipse(Brush* brush, Pen* pen, const Drawing::Point& center, NsFloat32 radiusX, NsFloat32 radiusY); /// Draws the specified Geometry using the specified Brush and Pen void DrawGeometry(Brush* brush, Pen* pen, Geometry* geometry); /// Draws an image into the region defined by the specified Rect void DrawImage(ImageSource* imageSource, const Drawing::Rect& rect); /// Draws a line with the specified Pen void DrawLine(Pen* pen, const Drawing::Point& p0, const Drawing::Point& p1); /// Draws a rectangle void DrawRectangle(Brush* brush, Pen* pen, const Drawing::Rect& rect); /// Draws a rounded rectangle void DrawRoundedRectangle(Brush* brush, Pen* pen, const Drawing::Rect& rect, NsFloat32 radiusX, NsFloat32 radiusY); /// Draws formatted text at the specified location void DrawText(FormattedText* formattedText, const Drawing::Rect& bounds); /// Pops the last opacity mask, opacity, clip, effect, or transform operation that was pushed /// onto the drawing context void Pop(); /// Pushes the specified clip region onto the drawing context void PushClip(Geometry* clipGeometry); /// Pushes the specified opacity setting onto the drawing context void PushOpacity(NsFloat32 opacity); /// Pushes the specified opacity mask onto the drawing context void PushOpacityMask(Brush* opacityMask); /// Pushes the specified Transform onto the drawing context void PushTransform(Transform* transform); };