本文整理汇总了C++中Accidental::mag方法的典型用法代码示例。如果您正苦于以下问题:C++ Accidental::mag方法的具体用法?C++ Accidental::mag怎么用?C++ Accidental::mag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Accidental
的用法示例。
在下文中一共展示了Accidental::mag方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: layout
void TrillSegment::layout()
{
if (staff())
setMag(staff()->mag(tick()));
if (isSingleType() || isBeginType()) {
Accidental* a = trill()->accidental();
if (a) {
a->layout();
a->setMag(a->mag() * .6);
qreal _spatium = spatium();
a->setPos(_spatium * 1.3, -2.2 * _spatium);
a->setParent(this);
}
switch (trill()->trillType()) {
case Trill::Type::TRILL_LINE:
symbolLine(SymId::ornamentTrill, SymId::wiggleTrill);
break;
case Trill::Type::PRALLPRALL_LINE:
symbolLine(SymId::wiggleTrill, SymId::wiggleTrill);
break;
case Trill::Type::UPPRALL_LINE:
symbolLine(SymId::ornamentBottomLeftConcaveStroke,
SymId::ornamentZigZagLineNoRightEnd, SymId::ornamentZigZagLineWithRightEnd);
break;
case Trill::Type::DOWNPRALL_LINE:
symbolLine(SymId::ornamentLeftVerticalStroke,
SymId::ornamentZigZagLineNoRightEnd, SymId::ornamentZigZagLineWithRightEnd);
break;
}
}
else
symbolLine(SymId::wiggleTrill, SymId::wiggleTrill);
autoplaceSpannerSegment();
}
示例2: layout
void TrillSegment::layout()
{
if (autoplace())
setUserOff(QPointF());
if (staff())
setMag(staff()->mag(tick()));
if (isSingleType() || isBeginType()) {
Accidental* a = trill()->accidental();
if (a) {
a->layout();
a->setMag(a->mag() * .6);
qreal _spatium = spatium();
a->setPos(_spatium * 1.3, -2.2 * _spatium);
a->setParent(this);
}
switch (trill()->trillType()) {
case Trill::Type::TRILL_LINE:
symbolLine(SymId::ornamentTrill, SymId::wiggleTrill);
break;
case Trill::Type::PRALLPRALL_LINE:
symbolLine(SymId::wiggleTrill, SymId::wiggleTrill);
break;
case Trill::Type::UPPRALL_LINE:
symbolLine(SymId::ornamentBottomLeftConcaveStroke,
SymId::ornamentZigZagLineNoRightEnd, SymId::ornamentZigZagLineWithRightEnd);
break;
case Trill::Type::DOWNPRALL_LINE:
symbolLine(SymId::ornamentLeftVerticalStroke,
SymId::ornamentZigZagLineNoRightEnd, SymId::ornamentZigZagLineWithRightEnd);
break;
}
}
else
symbolLine(SymId::wiggleTrill, SymId::wiggleTrill);
if (parent()) {
qreal yo = score()->styleP(trill()->placeBelow() ? Sid::trillPosBelow : Sid::trillPosAbove);
rypos() = yo;
if (autoplace()) {
qreal minDistance = spatium();
Shape s1 = shape().translated(pos());
if (trill()->placeAbove()) {
qreal d = system()->topDistance(staffIdx(), s1);
if (d > -minDistance)
rUserYoffset() = -d - minDistance;
}
else {
qreal d = system()->bottomDistance(staffIdx(), s1);
if (d > -minDistance)
rUserYoffset() = d + minDistance;
}
}
}
}
示例3: layout
void TrillSegment::layout()
{
if (parent())
rypos() += score()->styleS(StyleIdx::trillY).val() * spatium();
if (staff())
setMag(staff()->mag());
if (spannerSegmentType() == SpannerSegmentType::SINGLE || spannerSegmentType() == SpannerSegmentType::BEGIN) {
Accidental* a = trill()->accidental();
if (a) {
a->layout();
a->setMag(a->mag() * .6);
qreal _spatium = spatium();
a->setPos(_spatium * 1.3, -2.2 * _spatium);
a->adjustReadPos();
}
switch (trill()->trillType()) {
case Trill::Type::TRILL_LINE:
symbolLine(SymId::ornamentTrill, SymId::wiggleTrill);
break;
case Trill::Type::PRALLPRALL_LINE:
symbolLine(SymId::wiggleTrill, SymId::wiggleTrill);
break;
case Trill::Type::UPPRALL_LINE:
if (score()->scoreFont()->isValid(SymId::ornamentBottomLeftConcaveStroke))
symbolLine(SymId::ornamentBottomLeftConcaveStroke,
SymId::ornamentZigZagLineNoRightEnd, SymId::ornamentZigZagLineWithRightEnd);
else
symbolLine(SymId::ornamentUpPrall,
// SymId::ornamentZigZagLineNoRightEnd, SymId::ornamentZigZagLineWithRightEnd);
SymId::ornamentZigZagLineNoRightEnd);
break;
case Trill::Type::DOWNPRALL_LINE:
if (score()->scoreFont()->isValid(SymId::ornamentLeftVerticalStroke))
symbolLine(SymId::ornamentLeftVerticalStroke,
SymId::ornamentZigZagLineNoRightEnd, SymId::ornamentZigZagLineWithRightEnd);
else
symbolLine(SymId::ornamentDownPrall,
// SymId::ornamentZigZagLineNoRightEnd, SymId::ornamentZigZagLineWithRightEnd);
SymId::ornamentZigZagLineNoRightEnd);
break;
}
}
else
symbolLine(SymId::wiggleTrill, SymId::wiggleTrill);
adjustReadPos();
}
示例4: layout
void TrillSegment::layout()
{
QRectF b1(symBbox(SymId::ornamentTrill));
QRectF rr(b1.translated(-b1.x(), 0.0));
rr |= QRectF(0.0, rr.y(), pos2().x(), rr.height());
setbbox(rr);
if (parent())
rypos() += score()->styleS(ST_trillY).val() * spatium();
if (spannerSegmentType() == SEGMENT_SINGLE || spannerSegmentType() == SEGMENT_BEGIN) {
Accidental* a = trill()->accidental();
if (a) {
a->layout();
a->setMag(a->mag() * .6);
qreal _spatium = spatium();
a->setPos(_spatium*1.3, -2.2*_spatium);
a->adjustReadPos();
}
}
adjustReadPos();
}