ACF $AcfVersion:0$
CSplineShape.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
6#include <i2d/CVector2d.h>
8
9
10namespace iview{
11
12
14{
15public:
17
18 // reimplemented (imod::IObserver)
19 virtual bool OnModelAttached(imod::IModel* modelPtr, istd::IChangeable::ChangeSet& changeMask) override;
20
21protected:
22 virtual void DrawPolyBezier(QPainter& drawContext, const i2d::CVector2d* pointsPtr, int pointsCount) const;
23
24 // reimplemented (iview::CPolygonShape)
25 virtual i2d::CVector2d GetSegmentMiddle(int index) const override;
26 virtual void DrawCurve(QPainter& drawContext) const override;
27
28 // reimplemented (iview::CRectControlledShapeBase)
29 virtual bool IsCurveTouched(istd::CIndex2d position) const override;
30
31 // reimplemented (iview::CShapeBase)
32 virtual i2d::CRect CalcBoundingBox() const override;
33};
34
35
36} // namespace iview
37
38
39
40
Simple rectangle with integer bounds.
Definition CRect.h:22
Definition of position or mathematical vector on 2D plane.
Definition CVector2d.h:29
Common interface for model objects, that supports Model/Observer design pattern.
Definition IModel.h:25
Index implementation for addressing elements in 2D-space.
Definition CIndex2d.h:21
Set of change flags (its IDs).
Definition IChangeable.h:36
virtual void DrawCurve(QPainter &drawContext) const override
virtual void DrawPolyBezier(QPainter &drawContext, const i2d::CVector2d *pointsPtr, int pointsCount) const
virtual bool IsCurveTouched(istd::CIndex2d position) const override
virtual i2d::CVector2d GetSegmentMiddle(int index) const override
virtual i2d::CRect CalcBoundingBox() const override
Calculate bounding box.
CPolylineShape BaseClass
virtual bool OnModelAttached(imod::IModel *modelPtr, istd::IChangeable::ChangeSet &changeMask) override
Callback invoked when an observable model is about to be attached to this observer.
In this library is defined 2D view concept and standard visualisation objects.