Example #1
0
int alinhamento_rec(char **S, Vertex *Mtz, unsigned int *tams, unsigned int *indexp, unsigned int pos, VUTIL des)
{
    int pant = volta(pos, des, indexp), /* Ponto anterior. */
        vw,                             /* Valor de retorno das recursões. */
        valor = INT_MIN,                /* Maior valor das recursões. */
        watu = W(pos, pant, S, indexp); /* W calculado com o ponto anterior. */
    VUTIL destino = 0;
    /* Fim da recursão */

    if (pos) {
        int max = P2k;

        /* Calculando todos os deslocamentos possíveis. */
        for( int d=1; d<max; d++) {
            int np = Vizinho(pos, d, indexp, Mtz);
            if (np>=0) {
                vw = alinhamento_rec(S, Mtz, tams, indexp, np, d);
                if (valor < vw) {
                    destino = d;
                    valor = vw;
                }
            }
        }
    }
    else {
        valor = 0;
    }
    Mtz[pos].destino = destino;
    return watu + valor;
}
Example #2
0
QVariant VoltaSegment::getProperty(P_ID id) const
      {
      switch (id) {
            case P_ID::VOLTA_TYPE:
                  return volta()->getProperty(id);
            default:
                  return TextLineSegment::getProperty(id);
            }
      }
Example #3
0
bool VoltaSegment::setProperty(P_ID id, const QVariant& v)
      {
      switch (id) {
            case P_ID::LINE_WIDTH:
            case P_ID::VOLTA_TYPE:
                  return volta()->setProperty(id, v);
            default:
                  return TextLineSegment::setProperty(id, v);
            }
      }
Example #4
0
QVariant VoltaSegment::propertyDefault(P_ID id) const
      {
      switch (id) {
            case P_ID::LINE_WIDTH:
            case P_ID::VOLTA_TYPE:
                  return volta()->propertyDefault(id);
            default:
                  return TextLineSegment::propertyDefault(id);
            }
      }
Example #5
0
void VoltaSegment::resetProperty(P_ID id)
      {
      switch (id) {
            case P_ID::VOLTA_ENDING:
            case P_ID::LINE_WIDTH:
                  return volta()->resetProperty(id);

            default:
                  return TextLineBaseSegment::resetProperty(id);
            }
      }
Example #6
0
bool VoltaSegment::setProperty(P_ID id, const QVariant& v)
      {
      switch (id) {
            case P_ID::VOLTA_ENDING:
            case P_ID::LINE_WIDTH:
            case P_ID::LINE_STYLE:
            case P_ID::BEGIN_TEXT_OFFSET:
                  return volta()->setProperty(id, v);
            default:
                  return TextLineBaseSegment::setProperty(id, v);
            }
      }
Example #7
0
PropertyFlags VoltaSegment::propertyFlags(P_ID id) const
      {
      switch (id) {
            case P_ID::LINE_WIDTH:
            case P_ID::LINE_STYLE:
            case P_ID::LINE_COLOR:
                  return volta()->propertyFlags(id);

            default:
                  return TextLineBaseSegment::propertyFlags(id);
            }
      }
Example #8
0
QVariant VoltaSegment::getProperty(P_ID id) const
      {
      switch (id) {
            case P_ID::VOLTA_ENDING:
            case P_ID::LINE_WIDTH:
            case P_ID::LINE_STYLE:
            case P_ID::VOLTA_TYPE:
                  return volta()->getProperty(id);
            default:
                  return TextLineBaseSegment::getProperty(id);
            }
      }
Example #9
0
PropertyStyle VoltaSegment::propertyStyle(P_ID id) const
      {
      switch (id) {
            case P_ID::VOLTA_TYPE:
                  return PropertyStyle::NOSTYLE;

            case P_ID::LINE_WIDTH:
                  return volta()->propertyStyle(id);

            default:
                  return TextLineSegment::propertyStyle(id);
            }
      }
Example #10
0
void VoltaSegment::resetProperty(P_ID id)
      {
      switch (id) {
            case P_VOLTA_TYPE:
                  return;

            case P_LINE_WIDTH:
                  return volta()->resetProperty(id);

            default:
                  return TextLineSegment::resetProperty(id);
            }
      }
Example #11
0
QVariant VoltaSegment::propertyDefault(P_ID id) const
      {
      switch (id) {
            case P_ID::LINE_WIDTH:
            case P_ID::VOLTA_TYPE:
            case P_ID::BEGIN_TEXT_PLACE:
            case P_ID::CONTINUE_TEXT_PLACE:
            case P_ID::ANCHOR:
            case P_ID::BEGIN_HOOK:
            case P_ID::BEGIN_HOOK_HEIGHT:
            case P_ID::END_HOOK_HEIGHT:
                  return volta()->propertyDefault(id);
            default:
                  return TextLineSegment::propertyDefault(id);
            }
      }
Example #12
0
StyleIdx VoltaSegment::getPropertyStyle(P_ID id) const
      {
      switch (id) {
            case P_ID::LINE_WIDTH:
            case P_ID::LINE_STYLE:
            case P_ID::BEGIN_FONT_FACE:
            case P_ID::BEGIN_FONT_SIZE:
            case P_ID::BEGIN_FONT_BOLD:
            case P_ID::BEGIN_FONT_ITALIC:
            case P_ID::BEGIN_FONT_UNDERLINE:
            case P_ID::BEGIN_TEXT_ALIGN:
            case P_ID::BEGIN_TEXT_OFFSET:
                  return volta()->getPropertyStyle(id);

            default:
                  return TextLineBaseSegment::getPropertyStyle(id);
            }
      }
Example #13
0
void VoltaSegment::styleChanged()
      {
      volta()->styleChanged();
      }