Main Page | Modules | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | Related Pages

TPosition Class Reference

Represents a MusicXML position entity. More...

#include <common.h>

List of all members.

Public Types

enum  {
  undefined = 0, defaultx = 1, defaulty, relativex,
  relativey, last = relativey
}

Public Member Functions

virtual void accept (TScoreVisitor &visitor)
void set (int pos, long val)
long get (int pos) const

Static Public Member Functions

const string xmlpos (int d)
 convert an integer position to a MusicXML string

int xmlpos (const string str)
 convert an MusicXML string to an integer position


Detailed Description

The position attributes are based on MuseData print suggestions. For most elements, any program will compute a default x and y position. The position attribute lets this be changed two ways. The default-x and default-y attributes change the computation of the default position. The origin becomes the left-hand side of the note or the musical position within the bar (x) and the top line of the staff (y). The relative-x and relative-y attributes change the position relative to the default position, either as computed by the individual program, or as overridden by the default-x and default-y attributes.
Positive x is right, negative x is left; positive y is up, negative y is down. All units are in tenths of interline space. Positions can be applied to notes, notations, directions, and stems. For stems, positive y lengthens a stem while negative y shortens it. Negative values for default-y are not allowed.
position is defined in common.dtd


Generated on Tue Mar 23 09:50:14 2004 for LibMusicXML by doxygen 1.3.3