LibreOffice Module chart2 (master) 1
Static Public Member Functions | List of all members
chart::Clipping Class Reference

#include <Clipping.hxx>

Static Public Member Functions

static void clipPolygonAtRectangle (const css::drawing::PolyPolygonShape3D &rPolygon, const ::basegfx::B2DRectangle &rRectangle, css::drawing::PolyPolygonShape3D &aResult, bool bSplitPiecesToDifferentPolygons=true)
 This class uses the Liang-Biarsky parametric line-clipping algorithm as described in: Computer Graphics: principles and practice, 2nd ed., James D. More...
 
static void clipPolygonAtRectangle (const std::vector< std::vector< css::drawing::Position3D > > &rPolygon, const ::basegfx::B2DRectangle &rRectangle, std::vector< std::vector< css::drawing::Position3D > > &aResult, bool bSplitPiecesToDifferentPolygons=true)
 

Detailed Description

Definition at line 30 of file Clipping.hxx.

Member Function Documentation

◆ clipPolygonAtRectangle() [1/2]

static void chart::Clipping::clipPolygonAtRectangle ( const css::drawing::PolyPolygonShape3D &  rPolygon,
const ::basegfx::B2DRectangle rRectangle,
css::drawing::PolyPolygonShape3D &  aResult,
bool  bSplitPiecesToDifferentPolygons = true 
)
static

This class uses the Liang-Biarsky parametric line-clipping algorithm as described in: Computer Graphics: principles and practice, 2nd ed., James D.

Foley et al., Section 3.12.4 on page 117. @descr The intersection between an open polygon and a rectangle is calculated and the resulting lines are placed into the poly-polygon aResult.

Parameters
rPolygonThe polygon is required to be open, ie. its start and end point have different coordinates and that it is continuous, ie. has no holes.
rRectangleThe clipping area.
aResultThe resulting lines that are the parts of the given polygon lying inside the clipping area are stored into aResult whose prior content is deleted first.

Referenced by chart::VSeriesPlotter::createRegressionCurvesShapes().

◆ clipPolygonAtRectangle() [2/2]

static void chart::Clipping::clipPolygonAtRectangle ( const std::vector< std::vector< css::drawing::Position3D > > &  rPolygon,
const ::basegfx::B2DRectangle rRectangle,
std::vector< std::vector< css::drawing::Position3D > > &  aResult,
bool  bSplitPiecesToDifferentPolygons = true 
)
static

The documentation for this class was generated from the following file: