![]() |
Verovio
Source code documentation
|
This class represents a MEI scoreDef. More...
#include <scoredef.h>
Public Member Functions | |
bool | IsSupportedChild (ClassId classId) override |
Check if a object is allowed as child. | |
bool | AddChildAdditionalCheck (Object *child) override |
Additional check when adding a child. | |
int | GetInsertOrderFor (ClassId classId) const override |
Return an order for the given ClassId. | |
void | ReplaceDrawingValues (const ScoreDef *newScoreDef) |
Replace the scoreDef with the content of the newScoreDef. | |
void | ReplaceDrawingValues (const StaffDef *newStaffDef) |
Replace the corresponding staffDef with the content of the newStaffDef. More... | |
void | ReplaceDrawingLabels (const StaffGrp *newStaffGrp) |
Replace the corresponding staffGrp with the labels of the newStaffGrp. More... | |
void | ResetFromDrawingValues () |
Replace the staffDef score attributes with the ones currently set as drawing values. More... | |
std::vector< int > | GetStaffNs () const |
Return all the @n values of the staffDef in a scoreDef. | |
void | SetRedrawFlags (int redrawFlags) |
Set the redraw flag to all staffDefs. More... | |
int | GetMaxStaffSize () const |
Return the maximum staff size in the scoreDef (100 if empty) | |
bool | IsSectionRestart () const |
bool | HasSystemStartLine () const |
Constructors, destructors, and other standard methods | |
Reset method resets all attribute classes | |
ScoreDef () | |
virtual | ~ScoreDef () |
Object * | Clone () const override |
Method call for copying child classes. More... | |
void | Reset () override |
Reset the object, that is 1) removing all children and 2) resetting all attributes. More... | |
std::string | GetClassName () const override |
StaffDef * | GetStaffDef (int n) |
Get the staffDef with number n (NULL if not found). | |
const StaffDef * | GetStaffDef (int n) const |
StaffGrp * | GetStaffGrp (const std::string &n) |
Get the staffGrp with number n (NULL if not found). | |
const StaffGrp * | GetStaffGrp (const std::string &n) const |
Set and get the scoreDef drawing flags for clef, keysig and mensur. | |
bool | DrawLabels () const |
void | SetDrawLabels (bool drawLabels) |
Set and get the scoreDef drawing width. | |
int | GetDrawingWidth () const |
void | SetDrawingWidth (int drawingWidth) |
Set and get the drawing label width. | |
int | GetDrawingLabelsWidth () const |
void | SetDrawingLabelsWidth (int width) |
void | ResetDrawingLabelsWidth () |
Getters for running elements | |
PgFoot * | GetPgFoot (data_PGFUNC func) |
const PgFoot * | GetPgFoot (data_PGFUNC func) const |
PgHead * | GetPgHead (data_PGFUNC func) |
const PgHead * | GetPgHead (data_PGFUNC func) const |
FunctorCode | Accept (Functor &functor) override |
Interface for class functor visitation. | |
FunctorCode | Accept (ConstFunctor &functor) const override |
FunctorCode | AcceptEnd (Functor &functor) override |
FunctorCode | AcceptEnd (ConstFunctor &functor) const override |
![]() | |
ScoreDefElement () | |
ScoreDefElement (ClassId classId) | |
virtual | ~ScoreDefElement () |
ScoreDefInterface * | GetScoreDefInterface () override |
const ScoreDefInterface * | GetScoreDefInterface () const override |
bool | HasClefInfo (int depth=1) const |
bool | HasKeySigInfo (int depth=1) const |
bool | HasMensurInfo (int depth=1) const |
bool | HasMeterSigInfo (int depth=1) const |
bool | HasMeterSigGrpInfo (int depth=1) const |
Clef * | GetClef () |
const Clef * | GetClef () const |
Clef * | GetClefCopy () const |
KeySig * | GetKeySig () |
const KeySig * | GetKeySig () const |
KeySig * | GetKeySigCopy () const |
Mensur * | GetMensur () |
const Mensur * | GetMensur () const |
Mensur * | GetMensurCopy () const |
MeterSig * | GetMeterSig () |
const MeterSig * | GetMeterSig () const |
MeterSig * | GetMeterSigCopy () const |
MeterSigGrp * | GetMeterSigGrp () |
const MeterSigGrp * | GetMeterSigGrp () const |
MeterSigGrp * | GetMeterSigGrpCopy () const |
![]() | |
bool | IsFloatingObject () const |
Wrapper for checking if an element is a floating object (system elements and control elements) | |
const Resources * | GetDocResources () const |
Resource access from the document. | |
Object (const Object &object) | |
Copy constructor that also copy the children. More... | |
Object & | operator= (const Object &object) |
Copy assignement - see copy constructor. | |
void | MoveChildrenFrom (Object *sourceParent, int idx=-1, bool allowTypeChange=false) |
Move all the children of the object passed as parameter to this one. More... | |
void | ReplaceChild (Object *currentChild, Object *replacingChild) |
Replace the currentChild with the replacingChild. More... | |
void | SortChildren (binaryComp comp) |
void | MoveItselfTo (Object *targetParent) |
Move an object to another parent. More... | |
virtual bool | CopyChildren () const |
Indicate whereas children have to be copied in copy / assignment constructors. More... | |
virtual void | CloneReset () |
Reset pointers after a copy and assignment constructor call. More... | |
const std::string & | GetID () const |
void | SetID (const std::string &id) |
void | SwapID (Object *other) |
void | ResetID () |
std::string | GetComment () const |
Methods for setting / getting comments. | |
void | SetComment (std::string comment) |
bool | HasComment () const |
std::string | GetClosingComment () const |
void | SetClosingComment (std::string endComment) |
bool | HasClosingComment () const |
ArrayOfObjects & | GetChildrenForModification () |
Return a reference to the children that allows modification. More... | |
void | CopyAttributesTo (Object *target) const |
Copy all the attributes of an obejct to target. More... | |
int | GetAttributes (ArrayOfStrAttr *attributes) const |
Fill an array of pairs with all attributes and their values. More... | |
bool | HasAttribute (std::string attribute, std::string value) const |
Check if an Object has an attribute with the specified value. | |
void | SetParent (Object *parent) |
Set the parent of the Object. More... | |
void | ResetParent () |
Reset the parent of the Object. More... | |
virtual void | AddChild (Object *object) |
Base method for adding children. More... | |
int | GetInsertOrderForIn (ClassId classId, const std::vector< ClassId > &order) const |
Find the order from an overriden GetInsertOrderFor method. | |
int | GetIdx () const |
Return the index position of the object in its parent (-1 if not found) | |
int | GetChildIndex (const Object *child) const |
Look for the Object in the children and return its position (-1 if not found) | |
int | GetDescendantIndex (const Object *child, const ClassId classId, int depth) |
Look for all Objects of a class and return its position (-1 if not found) | |
void | InsertChild (Object *element, int idx) |
Insert an element at the idx position. | |
void | RotateChildren (int first, int middle, int last) |
Rotates the child elements of the object leftwards, using std::rotate() with the given indices. More... | |
Object * | DetachChild (int idx) |
Detach the child at the idx position (NULL if not found) The parent pointer is set to NULL. | |
void | ReplaceWithCopyOf (Object *object) |
Replace an object with a copy of the other. More... | |
bool | HasDescendant (const Object *child, int deepness=UNLIMITED_DEPTH) const |
Return true if the object has the child Object as descendant (reference of direct). More... | |
Object * | Relinquish (int idx) |
Give up ownership of the child at the idx position (NULL if not found) This is a method to be used only in the very particular case where the child object cannot be detached straight away. More... | |
void | ClearRelinquishedChildren () |
Removes all the children that were previously relinquished. More... | |
void | ClearChildren () |
Clear the children vector and delete all the objects. | |
bool | DeleteChild (Object *child) |
Remove and delete the child. More... | |
int | DeleteChildrenByComparison (Comparison *comparison) |
Delete the children that match the comparison. More... | |
void | FillFlatList (ListOfConstObjects &list) const |
Fill the list of all the children LayerElement. More... | |
bool | IsModified () const |
Check if the content was modified or not. | |
void | Modify (bool modified=true) const |
Mark the object and its parent (if any) as modified. | |
bool | HasEditorialContent () |
Return true if the object contains any editorial content. | |
bool | HasNonEditorialContent () |
Return true if the object contains anything that is not editorial content. | |
void | SaveObject (Output *output, bool basic) |
Saves the object (and its children) using the specified output stream. | |
template<class Compare > | |
void | StableSort (Compare comp) |
Sort the child elements using std::stable_sort. | |
void | ReorderByXPos () |
Object * | FindNextChild (Comparison *comp, Object *start) |
Object * | FindPreviousChild (Comparison *comp, Object *start) |
Object () | |
Object (ClassId classId) | |
virtual | ~Object () |
ClassId | GetClassId () const final |
void | SetAsReferenceObject () |
Make an object a reference object that do not own children. More... | |
bool | IsReferenceObject () const |
bool | IsMilestoneElement () |
Wrapper for checking if an element has a milestone start interface and also if is set as a milestone element. | |
Object * | GetMilestoneEnd () |
bool | IsControlElement () const |
bool | IsEditorialElement () const |
bool | IsLayerElement () const |
bool | IsPageElement () const |
bool | IsRunningElement () const |
bool | IsScoreDefElement () const |
bool | IsSystemElement () const |
bool | IsTextElement () const |
void | RegisterAttClass (AttClassId attClassId) |
bool | HasAttClass (AttClassId attClassId) const |
void | RegisterInterface (std::vector< AttClassId > *attClasses, InterfaceId interfaceId) |
bool | HasInterface (InterfaceId interfaceId) const |
virtual AltSymInterface * | GetAltSymInterface () |
virtual const AltSymInterface * | GetAltSymInterface () const |
virtual AreaPosInterface * | GetAreaPosInterface () |
virtual const AreaPosInterface * | GetAreaPosInterface () const |
virtual BeamDrawingInterface * | GetBeamDrawingInterface () |
virtual const BeamDrawingInterface * | GetBeamDrawingInterface () const |
virtual DurationInterface * | GetDurationInterface () |
virtual const DurationInterface * | GetDurationInterface () const |
virtual LinkingInterface * | GetLinkingInterface () |
virtual const LinkingInterface * | GetLinkingInterface () const |
virtual FacsimileInterface * | GetFacsimileInterface () |
virtual const FacsimileInterface * | GetFacsimileInterface () const |
virtual PitchInterface * | GetPitchInterface () |
virtual const PitchInterface * | GetPitchInterface () const |
virtual PlistInterface * | GetPlistInterface () |
virtual const PlistInterface * | GetPlistInterface () const |
virtual PositionInterface * | GetPositionInterface () |
virtual const PositionInterface * | GetPositionInterface () const |
virtual StemmedDrawingInterface * | GetStemmedDrawingInterface () |
virtual const StemmedDrawingInterface * | GetStemmedDrawingInterface () const |
virtual TextDirInterface * | GetTextDirInterface () |
virtual const TextDirInterface * | GetTextDirInterface () const |
virtual TimePointInterface * | GetTimePointInterface () |
virtual const TimePointInterface * | GetTimePointInterface () const |
virtual TimeSpanningInterface * | GetTimeSpanningInterface () |
virtual const TimeSpanningInterface * | GetTimeSpanningInterface () const |
void | InsertBefore (Object *child, Object *newChild) |
void | InsertAfter (Object *child, Object *newChild) |
int | GetChildCount () const |
int | GetChildCount (const ClassId classId) const |
int | GetChildCount (const ClassId classId, int depth) const |
int | GetDescendantCount (const ClassId classId) const |
Object * | GetChild (int idx) |
Child access (generic) | |
const Object * | GetChild (int idx) const |
Object * | GetChild (int idx, const ClassId classId) |
const Object * | GetChild (int idx, const ClassId classId) const |
ArrayOfConstObjects | GetChildren () const |
Return the children as const reference or copy. | |
const ArrayOfObjects & | GetChildren () |
Object * | GetFirst (const ClassId classId=UNSPECIFIED) |
const Object * | GetFirst (const ClassId classId=UNSPECIFIED) const |
Object * | GetNext () |
const Object * | GetNext () const |
Object * | GetNext (const Object *child, const ClassId classId=UNSPECIFIED) |
const Object * | GetNext (const Object *child, const ClassId classId=UNSPECIFIED) const |
Object * | GetPrevious (const Object *child, const ClassId classId=UNSPECIFIED) |
const Object * | GetPrevious (const Object *child, const ClassId classId=UNSPECIFIED) const |
Object * | GetLast (const ClassId classId=UNSPECIFIED) |
Return the last child of the object (if any, NULL otherwise) | |
const Object * | GetLast (const ClassId classId=UNSPECIFIED) const |
Object * | GetParent () |
Get the parent of the Object. | |
const Object * | GetParent () const |
int | GetDrawingX () const override |
int | GetDrawingY () const override |
void | ResetCachedDrawingX () const override |
void | ResetCachedDrawingY () const override |
Object * | FindDescendantByID (const std::string &id, int deepness=UNLIMITED_DEPTH, bool direction=FORWARD) |
Look for a descendant with the specified id (returns NULL if not found) This method is a wrapper for the Object::FindByID functor. | |
const Object * | FindDescendantByID (const std::string &id, int deepness=UNLIMITED_DEPTH, bool direction=FORWARD) const |
Object * | FindDescendantByType (ClassId classId, int deepness=UNLIMITED_DEPTH, bool direction=FORWARD) |
Look for a descendant with the specified type (returns NULL if not found) This method is a wrapper for the Object::FindByType functor. | |
const Object * | FindDescendantByType (ClassId classId, int deepness=UNLIMITED_DEPTH, bool direction=FORWARD) const |
Object * | FindDescendantByComparison (Comparison *comparison, int deepness=UNLIMITED_DEPTH, bool direction=FORWARD) |
Return the first element matching the Comparison functor Deepness allow to limit the depth search (EditorialElements are not count) | |
const Object * | FindDescendantByComparison (Comparison *comparison, int deepness=UNLIMITED_DEPTH, bool direction=FORWARD) const |
Object * | FindDescendantExtremeByComparison (Comparison *comparison, int deepness=UNLIMITED_DEPTH, bool direction=FORWARD) |
Return the element matching the extreme value with an Comparison functor Deepness allow to limit the depth search (EditorialElements are not count) | |
const Object * | FindDescendantExtremeByComparison (Comparison *comparison, int deepness=UNLIMITED_DEPTH, bool direction=FORWARD) const |
ListOfObjects | FindAllDescendantsByType (ClassId classId, bool continueDepthSearchForMatches=true, int deepness=UNLIMITED_DEPTH) |
Return all the objects with specified type. | |
ListOfConstObjects | FindAllDescendantsByType (ClassId classId, bool continueDepthSearchForMatches=true, int deepness=UNLIMITED_DEPTH) const |
void | FindAllDescendantsByComparison (ListOfObjects *objects, Comparison *comparison, int deepness=UNLIMITED_DEPTH, bool direction=FORWARD, bool clear=true) |
Return all the objects matching the Comparison functor Deepness allow to limit the depth search (EditorialElements are not count) | |
void | FindAllDescendantsByComparison (ListOfConstObjects *objects, Comparison *comparison, int deepness=UNLIMITED_DEPTH, bool direction=FORWARD, bool clear=true) const |
void | FindAllDescendantsBetween (ListOfObjects *objects, Comparison *comparison, const Object *start, const Object *end, bool clear=true, int depth=UNLIMITED_DEPTH) |
Return all the objects matching the Comparison functor and being between start and end in the tree. More... | |
void | FindAllDescendantsBetween (ListOfConstObjects *objects, Comparison *comparison, const Object *start, const Object *end, bool clear=true, int depth=UNLIMITED_DEPTH) const |
ListOfObjects | GetAncestors () |
Returns all ancestors. | |
ListOfConstObjects | GetAncestors () const |
Object * | GetFirstAncestor (const ClassId classId, int maxSteps=-1) |
Return the first ancestor of the specified type. More... | |
const Object * | GetFirstAncestor (const ClassId classId, int maxSteps=-1) const |
Object * | GetFirstAncestorInRange (const ClassId classIdMin, const ClassId classIdMax, int maxDepth=-1) |
const Object * | GetFirstAncestorInRange (const ClassId classIdMin, const ClassId classIdMax, int maxDepth=-1) const |
Object * | GetLastAncestorNot (const ClassId classId, int maxSteps=-1) |
Return the last ancestor that is NOT of the specified type. More... | |
const Object * | GetLastAncestorNot (const ClassId classId, int maxSteps=-1) const |
Object * | GetFirstChildNot (const ClassId classId) |
Return the first child that is NOT of the specified type. | |
const Object * | GetFirstChildNot (const ClassId classId) const |
bool | IsAttribute () const |
void | IsAttribute (bool isAttribute) |
bool | IsExpansion () const |
void | IsExpansion (bool isExpansion) |
void | Process (Functor &functor, int deepness=UNLIMITED_DEPTH, bool skipFirst=false) |
Main method that processes functors. More... | |
void | Process (ConstFunctor &functor, int deepness=UNLIMITED_DEPTH, bool skipFirst=false) const |
void | LogDebugTree (int maxDepth=UNLIMITED_DEPTH, int level=0) |
Output the class name of the object (or a custom msg) and of its children recursively. | |
virtual std::string | LogDebugTreeMsg () |
![]() | |
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 |
![]() | |
ScoreDefInterface () | |
virtual | ~ScoreDefInterface () |
void | Reset () override |
Virtual reset method. More... | |
InterfaceId | IsInterface () const override |
Virtual method returning the InterfaceId of the interface. More... | |
![]() | |
void | RegisterInterfaceAttClass (AttClassId attClassId) |
Method for registering an MEI att classes in the interface. | |
std::vector< AttClassId > * | GetAttClasses () |
Method for obtaining a pointer to the attribute class vector of the interface. | |
Interface () | |
virtual | ~Interface () |
![]() | |
ObjectListInterface (const ObjectListInterface &listInterface) | |
ObjectListInterface & | operator= (const ObjectListInterface &listInterface) |
int | GetListIndex (const Object *listElement) const |
Look for the Object in the list and return its position (-1 if not found) | |
void | ResetList () const |
Reset the list of children and call FilterList(). | |
const Object * | GetListFirst (const Object *startFrom, const ClassId classId=UNSPECIFIED) const |
Gets the first item of type elementType starting at startFrom. | |
Object * | GetListFirst (const Object *startFrom, const ClassId classId=UNSPECIFIED) |
const Object * | GetListFirstBackward (const Object *startFrom, const ClassId classId=UNSPECIFIED) const |
Object * | GetListFirstBackward (const Object *startFrom, const ClassId classId=UNSPECIFIED) |
const Object * | GetListPrevious (const Object *listElement) const |
Returns the previous object in the list (NULL if not found) | |
Object * | GetListPrevious (const Object *listElement) |
const Object * | GetListNext (const Object *listElement) const |
Returns the next object in the list (NULL if not found) | |
Object * | GetListNext (const Object *listElement) |
const ListOfConstObjects & | GetList () const |
Return the list. More... | |
ListOfObjects | GetList () |
bool | HasEmptyList () const |
Convenience functions that check if the list is up-to-date If not, the list is updated before returning the result. | |
int | GetListSize () const |
const Object * | GetListFront () const |
Object * | GetListFront () |
const Object * | GetListBack () const |
Object * | GetListBack () |
Public Attributes | |
bool | m_setAsDrawing |
bool | m_insertScoreDef |
![]() | |
ArrayOfStrAttr | m_unsupported |
Keep an array of unsupported attributes as pairs. More... | |
Protected Member Functions | |
void | FilterList (ListOfConstObjects &childList) const override |
Filter the flat list and keep only StaffDef elements. | |
Additional Inherited Members | |
![]() | |
typedef bool(* | binaryComp) (Object *, Object *) |
Sort children by a function that takes two arguments and returns true if the first argument is less than the second. More... | |
![]() | |
static void | SeedID (uint32_t seed=0) |
static std::string | GenerateHashID () |
static uint32_t | Hash (uint32_t number, bool reverse=false) |
static bool | sortByUlx (Object *a, Object *b) |
static bool | IsPreOrdered (const Object *left, const Object *right) |
Return true if left appears before right in preorder traversal. | |
static bool | IsControlElement (ClassId classId) |
static bool | IsEditorialElement (ClassId classId) |
static bool | IsLayerElement (ClassId classId) |
static bool | IsPageElement (ClassId classId) |
static bool | IsRunningElement (ClassId classId) |
static bool | IsScoreDefElement (ClassId classId) |
static bool | IsSystemElement (ClassId classId) |
static bool | IsTextElement (ClassId classId) |
![]() | |
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) |
![]() | |
int | m_cachedDrawingX |
The cached version of the drawingX and drawingY values. More... | |
int | m_cachedDrawingY |
This class represents a MEI scoreDef.
It contains StaffGrp objects.
|
inlineoverridevirtual |
Method call for copying child classes.
The method has to be overridden.
Reimplemented from vrv::Object.
bool vrv::ScoreDef::HasSystemStartLine | ( | ) | const |
void vrv::ScoreDef::ReplaceDrawingLabels | ( | const StaffGrp * | newStaffGrp | ) |
Replace the corresponding staffGrp with the labels of the newStaffGrp.
Looks for the staffGrp with the same m_n (
) and replaces label child
void vrv::ScoreDef::ReplaceDrawingValues | ( | const StaffDef * | newStaffDef | ) |
Replace the corresponding staffDef with the content of the newStaffDef.
Looks for the staffDef with the same m_n (
) and replaces the attribute set. Attribute set is provided by the ScoreOrStaffDefInterface.
|
overridevirtual |
Reset the object, that is 1) removing all children and 2) resetting all attributes.
The method is virtual, so always call the parent in the method overriding it.
Reimplemented from vrv::ScoreDefElement.
void vrv::ScoreDef::ResetFromDrawingValues | ( | ) |
Replace the staffDef score attributes with the ones currently set as drawing values.
Used when initializing a selection and adding a temporary score for it.
void vrv::ScoreDef::SetRedrawFlags | ( | int | redrawFlags | ) |
Set the redraw flag to all staffDefs.
This is necessary at the beginning or when a scoreDef occurs.