![]() |
Verovio
Source code documentation
|
This class represents a basic object in the layout domain. More...
#include <floatingobject.h>
Public Member Functions | |
| FloatingPositioner (FloatingObject *object, StaffAlignment *alignment, char spanningType) | |
| ClassId | GetClassId () const override |
| virtual void | ResetPositioner () |
| void | ResetCachedDrawingX () const override |
| void | ResetCachedDrawingY () const override |
| char | GetSpanningType () const |
| Getter for the spanning type. | |
| data_STAFFREL | GetDrawingPlace () const |
| bool | HasHorizontalOverlapWith (const BoundingBox *bbox, int unit) const |
| Check for horizontal overlap with special consideration for extender lines. | |
| int | GetAdmissibleHorizOverlapMargin (const BoundingBox *bbox, int unit) const |
| Return the horizontal margin for overlap with another element This can be negative, if elements are allowed to slightly overlap. | |
| void | CalcDrawingYRel (const Doc *doc, const StaffAlignment *staffAlignment, const BoundingBox *horizOverlappingBBox) |
| Update the Y drawing relative position based on collision detection with the overlapping bounding box. | |
| void | AdjustExtenders () |
| Align extender elements across systems. | |
| int | GetSpaceBelow (const Doc *doc, const StaffAlignment *staffAlignment, const BoundingBox *horizOverlappingBBox) const |
| Calculate the vertical space below the element and above the bounding box. | |
| bool | HasVerticalContentOverlap (const Doc *doc, const BoundingBox *horizOverlappingBBox, int margin) const |
| Version of Boundary::VerticalContentOverlap which takes refined boundaries into account. | |
Get the X and Y drawing position | |
| int | GetDrawingX () const override |
| int | GetDrawingY () const override |
Setter and getters for the objectX and Y | |
| void | SetObjectXY (Object *objectX, Object *objectY) |
| Object * | GetObjectX () |
| const Object * | GetObjectX () const |
| Object * | GetObjectY () |
| const Object * | GetObjectY () const |
| FloatingObject * | GetObject () |
| Getter for the FloatingObject (asserted, cannot be NULL) | |
| const FloatingObject * | GetObject () const |
| StaffAlignment * | GetAlignment () |
| Getter for the StaffAlignment (asserted, cannot be NULL) | |
| const StaffAlignment * | GetAlignment () const |
Get and set the X and Y drawing relative position. | |
(X is currently used only for Arpeg) | |
| int | GetDrawingYRel () const |
| virtual void | SetDrawingYRel (int drawingYRel, bool force=false) |
| int | GetDrawingXRel () const |
| virtual void | SetDrawingXRel (int drawingXRel) |
Get and set the drawing extender width. | |
Should be nonzero only if the extender line is not included in the bounding box. | |
| int | GetDrawingExtenderWidth () const |
| void | SetDrawingExtenderWidth (int extenderWidth) |
| std::pair< int, bool > | GetVerticalContentBoundaryRel (const Doc *doc, const BoundingBox *horizOverlappingBBox, bool contentTop) const |
| Determine the vertical content boundary. More... | |
| int | GetVerticalContentBoundary (const Doc *doc, const BoundingBox *horizOverlappingBBox, bool contentTop) const |
Public Member Functions inherited from vrv::BoundingBox | |
| virtual void | ResetBoundingBox () |
| Reset the bounding box values. | |
| bool | Encloses (const Point point) const |
| Return true if the bounding box encloses the point. | |
| int | Intersects (const FloatingCurvePositioner *curve, Accessor type, int margin=0) const |
| Return intersection between the bounding box and the curve represented by the FloatingPositioner. More... | |
| int | Intersects (const BeamDrawingInterface *beamInterface, Accessor type, int margin=0, bool fromBeamContentSide=false) const |
| Return intersection between the bounding box and the beam represented by the BeamDrawingInterface. More... | |
| BoundingBox () | |
| virtual | ~BoundingBox () |
| bool | Is (ClassId classId) const |
| bool | Is (const std::vector< ClassId > &classIds) const |
| virtual void | UpdateContentBBoxX (int x1, int x2) |
| virtual void | UpdateContentBBoxY (int y1, int y2) |
| virtual void | UpdateSelfBBoxX (int x1, int x2) |
| virtual void | UpdateSelfBBoxY (int y1, int y2) |
| void | SetEmptyBB () |
| bool | HasSelfBB () const |
| bool | HasSelfHorizontalBB () const |
| bool | HasSelfVerticalBB () const |
| bool | HasContentBB () const |
| bool | HasContentHorizontalBB () const |
| bool | HasContentVerticalBB () const |
| bool | HasEmptyBB () const |
| void | SetBoundingBoxGlyph (char32_t smuflGlyph, int fontSize) |
| Set and get the smuflGlyph / fontsize for a bounding box that is the one of a single SMuFL glyph. | |
| char32_t | GetBoundingBoxGlyph () const |
| int | GetBoundingBoxGlyphFontSize () const |
| int | GetSelfBottom () const |
| int | GetSelfTop () const |
| int | GetSelfLeft () const |
| int | GetSelfRight () const |
| int | GetContentBottom () const |
| int | GetContentTop () const |
| int | GetContentLeft () const |
| int | GetContentRight () const |
| int | GetSelfX1 () const |
| int | GetSelfX2 () const |
| int | GetSelfY1 () const |
| int | GetSelfY2 () const |
| int | GetContentX1 () const |
| int | GetContentX2 () const |
| int | GetContentY1 () const |
| int | GetContentY2 () const |
| int | GetBottomBy (Accessor type) const |
| int | GetTopBy (Accessor type) const |
| int | GetLeftBy (Accessor type) const |
| int | GetRightBy (Accessor type) const |
| int | GetX1By (Accessor type) const |
| int | GetX2By (Accessor type) const |
| int | GetY1By (Accessor type) const |
| int | GetY2By (Accessor type) const |
| bool | HorizontalContentOverlap (const BoundingBox *other, int margin=0) const |
| bool | VerticalContentOverlap (const BoundingBox *other, int margin=0) const |
| bool | HorizontalSelfOverlap (const BoundingBox *other, int margin=0) const |
| bool | VerticalSelfOverlap (const BoundingBox *other, int margin=0) const |
| int | HorizontalLeftOverlap (const BoundingBox *other, const Doc *doc, int margin=0, int vMargin=0) const |
| int | HorizontalRightOverlap (const BoundingBox *other, const Doc *doc, int margin=0, int vMargin=0) const |
| int | VerticalTopOverlap (const BoundingBox *other, const Doc *doc, int margin=0, int hMargin=0) const |
| int | VerticalBottomOverlap (const BoundingBox *other, const Doc *doc, int margin=0, int hMargin=0) const |
| int | GetCutOutTop (const Resources &resources) const |
| int | GetCutOutBottom (const Resources &resources) const |
| int | GetCutOutLeft (const Resources &resources) const |
| int | GetCutOutRight (const Resources &resources) const |
| int | GetCutOutLeft (const Resources &resources, bool fromTop) const |
| int | GetCutOutRight (const Resources &resources, bool fromTop) const |
Public Attributes | |
| char | m_spanningType |
| The spanning type of the positioner for spanning control elements. | |
Protected Attributes | |
| int | m_drawingXRel |
| The X drawing relative position of the object. More... | |
| int | m_drawingYRel |
| The Y drawing relative position of the object. More... | |
| int | m_drawingExtenderWidth |
| The horizontal width of the extender line whenever it is not included in the bounding box. | |
| FloatingObject * | m_object |
| A pointer to the FloatingObject it represents. | |
| StaffAlignment * | m_alignment |
| A pointer to the StaffAlignment that owns it. | |
| data_STAFFREL | m_place |
Protected Attributes inherited from vrv::BoundingBox | |
| int | m_cachedDrawingX |
| The cached version of the drawingX and drawingY values. More... | |
| int | m_cachedDrawingY |
Additional Inherited Members | |
Static Public Member Functions inherited from vrv::BoundingBox | |
| static std::pair< double, int > | ApproximateBezierExtrema (const Point bezier[4], bool isMaxExtrema, int approximationSteps=BEZIER_APPROXIMATION) |
| static double | CalcDistance (const Point &p1, const Point &p2) |
| Calculate the euclidean distance between two points. | |
| static bool | ArePointsClose (const Point &p1, const Point &p2, int margin) |
| static double | CalcSlope (const Point &p1, const Point &p2) |
| Calculate the slope represented by two points. | |
| static Point | CalcPositionAfterRotation (Point point, float alpha, Point center) |
| Calculate the position of a point after a rotation of alpha (in radian) around the center. | |
| static double | CalcBezierParamAtPosition (const Point bezier[4], int x) |
| Calculate the t parameter of a bezier at position x. | |
| static int | CalcBezierAtPosition (const Point bezier[4], int x) |
| Calculate the y position of a bezier at position x. | |
| static void | CalcLinearInterpolation (Point &dest, const Point &a, const Point &b, double t) |
| Calculate linear interpolation between two points at time t. | |
| static Point | CalcPointAtBezier (const Point bezier[4], double t) |
| Calculate point (X,Y) coordinaties on the bezier curve. | |
| static double | GetBezierThicknessCoefficient (const Point bezier[4], int currentThickness, int penWidth) |
| Calculate thickness coefficient to be applient for bezier curve to fit MEI units thickness. | |
| static Point | CalcDeCasteljau (const Point bezier[4], double t) |
| Calculate the point bezier point position for a t between 0.0 and 1.0. | |
| static void | CalcThickBezier (const Point bezier[4], int thickness, Point topBezier[4], Point bottomBezier[4]) |
| Calculate the position of the bezier above and below for a thick bezier. | |
| static void | ApproximateBezierBoundingBox (const Point bezier[4], Point &pos, int &width, int &height, int &minYPos, int &maxYPos) |
| Approximate the bounding box of a bezier taking into accound the height and the width. | |
| static std::set< double > | SolveCubicPolynomial (double a, double b, double c, double d) |
| Solve the cubic equation ax^3 + bx^2 + cx + d = 0 Returns up to three real roots. | |
| static int | RectLeftOverlap (const Point rect1[2], const Point rect2[2], int margin, int vMargin) |
| Calculate the left / right / top / bottom overlap of two rectangle taking into account the margin / v-h-Margins. | |
| static int | RectRightOverlap (const Point rect1[2], const Point rect2[2], int margin, int vMargin) |
| static int | RectTopOverlap (const Point rect1[2], const Point rect2[2], int margin, int hMargin) |
| static int | RectBottomOverlap (const Point rect1[2], const Point rect2[2], int margin, int hMargin) |
This class represents a basic object in the layout domain.
| std::pair<int, bool> vrv::FloatingPositioner::GetVerticalContentBoundaryRel | ( | const Doc * | doc, |
| const BoundingBox * | horizOverlappingBBox, | ||
| bool | contentTop | ||
| ) | const |
Determine the vertical content boundary.
For refined layout this can take the overlapping bbox into account.
|
protected |
The X drawing relative position of the object.
Arpeg are positionned according to the top note through the FloatingPositioner (See View::DrawArpeg that sets the FloatingPositioner)
|
protected |
The Y drawing relative position of the object.
It is re-computed everytime the object is drawn and it is not stored in the file.