LibreOffice Module svx (master) 1
|
this class implements some helper functions to edit a B2DPolyPolygon More...
#include <polypolygoneditor.hxx>
Public Member Functions | |
PolyPolygonEditor (basegfx::B2DPolyPolygon aPolyPolygon) | |
const basegfx::B2DPolyPolygon & | GetPolyPolygon () const |
bool | DeletePoints (const o3tl::sorted_vector< sal_uInt16 > &rAbsPoints) |
returns true if the B2DPolyPolygon was changed. More... | |
bool | SetSegmentsKind (SdrPathSegmentKind eKind, const o3tl::sorted_vector< sal_uInt16 > &rAbsPoints) |
returns true if the B2DPolyPolygon was changed. More... | |
bool | SetPointsSmooth (basegfx::B2VectorContinuity eFlags, const o3tl::sorted_vector< sal_uInt16 > &rAbsPoints) |
returns true if the B2DPolyPolygon was changed. More... | |
Static Public Member Functions | |
static bool | GetRelativePolyPoint (const basegfx::B2DPolyPolygon &rPoly, sal_uInt32 nAbsPnt, sal_uInt32 &rPolyNum, sal_uInt32 &rPointNum) |
Outputs the relative position ( polygon number and point number in that polygon ) from the absolute point number. More... | |
Private Attributes | |
basegfx::B2DPolyPolygon | maPolyPolygon |
this class implements some helper functions to edit a B2DPolyPolygon
Definition at line 34 of file polypolygoneditor.hxx.
sdr::PolyPolygonEditor::PolyPolygonEditor | ( | basegfx::B2DPolyPolygon | aPolyPolygon | ) |
Definition at line 29 of file polypolygoneditor.cxx.
bool sdr::PolyPolygonEditor::DeletePoints | ( | const o3tl::sorted_vector< sal_uInt16 > & | rAbsPoints | ) |
returns true if the B2DPolyPolygon was changed.
Warning: B2DPolyPolygon can be empty after this operation!
Definition at line 34 of file polypolygoneditor.cxx.
References basegfx::B2DPolygon::count(), basegfx::B2DPolyPolygon::getB2DPolygon(), GetRelativePolyPoint(), maPolyPolygon, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::rbegin(), basegfx::B2DPolygon::remove(), basegfx::B2DPolyPolygon::remove(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::rend(), and basegfx::B2DPolyPolygon::setB2DPolygon().
Referenced by SdrPolyEditView::DeleteMarkedPoints().
|
inline |
Definition at line 39 of file polypolygoneditor.hxx.
References maPolyPolygon.
Referenced by SdrPolyEditView::DeleteMarkedPoints(), SdrPolyEditView::SetMarkedPointsSmooth(), and SdrPolyEditView::SetMarkedSegmentsKind().
|
static |
Outputs the relative position ( polygon number and point number in that polygon ) from the absolute point number.
False is returned if the given absolute point is greater not inside this B2DPolyPolygon
Definition at line 155 of file polypolygoneditor.cxx.
References basegfx::B2DPolygon::count(), basegfx::B2DPolyPolygon::count(), and basegfx::B2DPolyPolygon::getB2DPolygon().
Referenced by SdrDragMethod::createSdrDragEntries_PointDrag(), DeletePoints(), SetPointsSmooth(), and SetSegmentsKind().
bool sdr::PolyPolygonEditor::SetPointsSmooth | ( | basegfx::B2VectorContinuity | eFlags, |
const o3tl::sorted_vector< sal_uInt16 > & | rAbsPoints | ||
) |
returns true if the B2DPolyPolygon was changed.
Definition at line 126 of file polypolygoneditor.cxx.
References basegfx::utils::expandToCurveInPoint(), basegfx::B2DPolyPolygon::getB2DPolygon(), GetRelativePolyPoint(), maPolyPolygon, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::rbegin(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::rend(), basegfx::B2DPolyPolygon::setB2DPolygon(), and basegfx::utils::setContinuityInPoint().
Referenced by SdrPolyEditView::SetMarkedPointsSmooth().
bool sdr::PolyPolygonEditor::SetSegmentsKind | ( | SdrPathSegmentKind | eKind, |
const o3tl::sorted_vector< sal_uInt16 > & | rAbsPoints | ||
) |
returns true if the B2DPolyPolygon was changed.
Definition at line 66 of file polypolygoneditor.cxx.
References basegfx::B2DPolygon::areControlPointsUsed(), basegfx::B2DPolygon::count(), Curve, basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolyPolygon::getB2DPolygon(), GetRelativePolyPoint(), interpolate(), basegfx::B2DPolygon::isClosed(), basegfx::B2DPolygon::isNextControlPointUsed(), basegfx::B2DPolygon::isPrevControlPointUsed(), Line, maPolyPolygon, nCount, o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::rbegin(), o3tl::sorted_vector< typename Value, typename Compare, template< typename, typename > class Find, bool >::rend(), basegfx::B2DPolygon::resetNextControlPoint(), basegfx::B2DPolygon::resetPrevControlPoint(), basegfx::B2DPolyPolygon::setB2DPolygon(), basegfx::B2DPolygon::setNextControlPoint(), basegfx::B2DPolygon::setPrevControlPoint(), and Toggle.
Referenced by SdrPolyEditView::SetMarkedSegmentsKind().
|
private |
Definition at line 60 of file polypolygoneditor.hxx.
Referenced by DeletePoints(), SetPointsSmooth(), and SetSegmentsKind().