当前位置: 首页>>代码示例>>C++>>正文


C++ CellParser::GetScale方法代码示例

本文整理汇总了C++中CellParser::GetScale方法的典型用法代码示例。如果您正苦于以下问题:C++ CellParser::GetScale方法的具体用法?C++ CellParser::GetScale怎么用?C++ CellParser::GetScale使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CellParser的用法示例。


在下文中一共展示了CellParser::GetScale方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: RecalculateSize

void SubSupCell::RecalculateSize(CellParser& parser, int fontsize, bool all)
{
  double scale = parser.GetScale();

  m_baseCell->RecalculateSize(parser, fontsize, true);
  m_indexCell->RecalculateSize(parser, MAX(MC_MIN_SIZE, fontsize - SUBSUP_DEC), true);
  m_exptCell->RecalculateSize(parser, MAX(MC_MIN_SIZE, fontsize - SUBSUP_DEC), true);

  m_height = m_baseCell->GetMaxHeight() + m_indexCell->GetMaxHeight() +
             m_exptCell->GetMaxHeight() -
             2*SCALE_PX((8 * fontsize) / 10 + MC_EXP_INDENT, parser.GetScale());

  m_center = m_exptCell->GetMaxHeight() + m_baseCell->GetMaxCenter() -
             SCALE_PX((8 * fontsize) / 10 + MC_EXP_INDENT, scale);

  MathCell::RecalculateSize(parser, fontsize, all);
}
开发者ID:DevJohan,项目名称:wxmaxima,代码行数:17,代码来源:SubSupCell.cpp

示例2: RecalculateSize

void SlideShow::RecalculateSize(CellParser& parser, int fontsize)
{
  double scale = parser.GetScale();
  m_images[m_displayed]->ViewportSize(m_canvasSize.x,m_canvasSize.y,scale);
  
  m_height = (scale * m_images[m_displayed]->m_height) + 2 * m_imageBorderWidth;

  m_center = m_height / 2;
}
开发者ID:belkacem77,项目名称:wxmaxima,代码行数:9,代码来源:SlideShowCell.cpp

示例3: RecalculateWidths

void ConjugateCell::RecalculateWidths(CellParser& parser, int fontsize)
{
  double scale = parser.GetScale();
  m_innerCell->RecalculateWidthsList(parser, fontsize);
  m_width = m_innerCell->GetFullWidth(scale) + SCALE_PX(8, scale);
  m_open->RecalculateWidthsList(parser, fontsize);
  m_close->RecalculateWidthsList(parser, fontsize);
  ResetData();
}
开发者ID:JohnHuang-China,项目名称:wxmaxima,代码行数:9,代码来源:ConjugateCell.cpp

示例4: RecalculateWidths

void DiffCell::RecalculateWidths(int fontsize)
{
  CellParser *parser = CellParser::Get();
  double scale = parser->GetScale();
  m_baseCell->RecalculateWidthsList(fontsize);
  m_diffCell->RecalculateWidthsList(fontsize);
  m_width = m_baseCell->GetFullWidth(scale) + m_diffCell->GetFullWidth(scale) + 2*MC_CELL_SKIP;
  ResetData();
}
开发者ID:minoki,项目名称:wxmaxima,代码行数:9,代码来源:DiffCell.cpp

示例5: RecalculateSize

void SqrtCell::RecalculateSize(CellParser& parser, int fontsize)
{
  double scale = parser.GetScale();
  m_innerCell->RecalculateSizeList(parser, fontsize);
  m_height = m_innerCell->GetMaxHeight() + SCALE_PX(3, scale);
  m_center = m_innerCell->GetMaxCenter() + SCALE_PX(3, scale);
  m_open->RecalculateSizeList(parser, fontsize);
  m_close->RecalculateSizeList(parser, fontsize);
}
开发者ID:JohnHuang-China,项目名称:wxmaxima,代码行数:9,代码来源:SqrtCell.cpp

示例6: RecalculateSize

void ImgCell::RecalculateSize(CellParser& parser, int fontsize)
{
  double scale = parser.GetScale();
  m_image->ViewportSize(m_canvasSize.x,m_canvasSize.y,scale);
  
  m_height = (scale * m_image->m_height) + 2 * m_imageBorderWidth;
  ResetData();

  m_center = m_height / 2;
}
开发者ID:Kahkonen,项目名称:wxmaxima,代码行数:10,代码来源:ImgCell.cpp

示例7: RecalculateSize

void SqrtCell::RecalculateSize(int fontsize)
{
  CellParser *parser = CellParser::Get();
  double scale = parser->GetScale();
  m_innerCell->RecalculateSizeList(fontsize);
  m_height = m_innerCell->GetMaxHeight() + SCALE_PX(3, scale);
  m_center = m_innerCell->GetMaxCenter() + SCALE_PX(3, scale);
  m_open->RecalculateSizeList(fontsize);
  m_close->RecalculateSizeList(fontsize);
}
开发者ID:minoki,项目名称:wxmaxima,代码行数:10,代码来源:SqrtCell.cpp

示例8: DrawList

void MathCell::DrawList(CellParser& parser, wxPoint point, int fontsize)
{
  MathCell *tmp=this;
  while(tmp!=NULL)
  {
    tmp->Draw(parser,point,fontsize);
    double scale = parser.GetScale();
    point.x += tmp->m_width + SCALE_PX(MC_CELL_SKIP, scale);
    tmp=tmp->m_nextToDraw;
  }
}
开发者ID:BigMcLargeHuge,项目名称:wxmaxima,代码行数:11,代码来源:MathCell.cpp

示例9: RecalculateWidths

void SlideShow::RecalculateWidths(CellParser& parser, int fontsize, bool all)
{
  if (m_bitmaps[m_displayed] != NULL)
    m_width = m_bitmaps[m_displayed]->GetWidth() + 2;
  else
    m_width = 0;

  double scale = parser.GetScale();
  scale = MAX(scale, 1.0);

  m_width = (int) (scale * m_width);
  MathCell::RecalculateWidths(parser, fontsize, all);
}
开发者ID:Mehanik,项目名称:wxmaxima,代码行数:13,代码来源:SlideShowCell.cpp

示例10: RecalculateWidths

void LimitCell::RecalculateWidths(CellParser& parser, int fontsize, bool all)
{
  double scale = parser.GetScale();

  m_base->RecalculateWidths(parser, fontsize, true);
  m_under->RecalculateWidths(parser, MAX(MIN_LIMIT_FONT_SIZE, fontsize - LIMIT_FONT_SIZE_DECREASE), true);
  m_name->RecalculateWidths(parser, fontsize, true);

  m_width = MAX(m_name->GetFullWidth(scale), m_under->GetFullWidth(scale))
            + m_base->GetFullWidth(scale);

  MathCell::RecalculateWidths(parser, fontsize, all);
}
开发者ID:Alfonsib,项目名称:wxmaxima,代码行数:13,代码来源:LimitCell.cpp

示例11: RecalculateSize

void GroupCell::RecalculateSize(CellParser& parser, int fontsize)
{
  if (m_width == -1 || m_height == -1 || parser.ForceUpdate())
  {
    // special case
    if (m_groupType == GC_TYPE_PAGEBREAK) {
      m_width = 10;
      m_height = 2;
      m_center = 0;
      m_indent = 0;
      MathCell::RecalculateWidthsList(parser, fontsize);
      return;
    }

    double scale = parser.GetScale();
    m_input->RecalculateSizeList(parser, fontsize);
    m_center = m_input->GetMaxCenter();
    m_height = m_input->GetMaxHeight();
    m_indent = parser.GetIndent();

    if (m_output != NULL && !m_hide) {
      MathCell *tmp = m_output;
      while (tmp != NULL) {
        tmp->RecalculateSize(parser,  tmp->IsMath() ? m_mathFontSize : m_fontSize);
        tmp = tmp->m_next;
      }

      m_outputRect.x = m_currentPoint.x;
      m_outputRect.y = m_currentPoint.y - m_output->GetMaxCenter();
      m_outputRect.width = 0;
      m_outputRect.height = 0;
      m_height = m_input->GetMaxHeight();
      m_width = m_input->GetFullWidth(scale);

      tmp = m_output;
      while (tmp != NULL) {
        if (tmp->BreakLineHere() || tmp == m_output) {
          m_width = MAX(m_width, tmp->GetLineWidth(scale));
          m_outputRect.width = MAX(m_outputRect.width, tmp->GetLineWidth(scale));
          m_height += tmp->GetMaxHeight();
          if (tmp->m_bigSkip)
            m_height += MC_LINE_SKIP;
          m_outputRect.height += tmp->GetMaxHeight() + MC_LINE_SKIP;
        }
        tmp = tmp->m_nextToDraw;
      }
    }
  }

  m_appendedCells = NULL;
}
开发者ID:BigMcLargeHuge,项目名称:wxmaxima,代码行数:51,代码来源:GroupCell.cpp

示例12: RecalculateWidths

void SlideShow::RecalculateWidths(int fontsize)
{
  // Here we recalculate the height, as well:
  //  - This doesn't cost much time and
  //  - as image cell's sizes might change when the resolution does
  //    we might have intermittent calculation issues otherwise
  CellParser *parser = CellParser::Get();
  double scale = parser->GetScale();
  m_images[m_displayed]->ViewportSize(m_canvasSize.x,m_canvasSize.y,scale);
  
  m_width  = (scale * m_images[m_displayed]->m_width)  + 2 * m_imageBorderWidth;
  m_height = (scale * m_images[m_displayed]->m_height) + 2 * m_imageBorderWidth;
  m_center = m_height / 2;
}
开发者ID:minoki,项目名称:wxmaxima,代码行数:14,代码来源:SlideShowCell.cpp

示例13: RecalculateWidths

void FracCell::RecalculateWidths(int fontsize)
{
  CellParser *parser = CellParser::Get();
  double scale = parser->GetScale();
  if (m_isBroken || m_exponent)
  {
    m_num->RecalculateWidthsList(fontsize);
    m_denom->RecalculateWidthsList(fontsize);
  }
  else
  {
    m_num->RecalculateWidthsList(MAX(MC_MIN_SIZE, fontsize - FRAC_DEC));
    m_denom->RecalculateWidthsList(MAX(MC_MIN_SIZE, fontsize - FRAC_DEC));
  }
  if (m_exponent && !m_isBroken)
  {
    wxDC& dc = parser->GetDC();

    int height;
    int fontsize1 = (int) ((double)(fontsize) * scale + 0.5);
    dc.SetFont(wxFont(fontsize1, wxFONTFAMILY_MODERN,
    		wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false,
    		parser->GetFontName(TS_VARIABLE)));
    dc.GetTextExtent(wxT("/"), &m_expDivideWidth, &height);
    m_width = m_num->GetFullWidth(scale) + m_denom->GetFullWidth(scale) + m_expDivideWidth;
  }
  else
  {
    wxDC& dc = parser->GetDC();

    // We want half a space's widh of blank space to separate us from the
    // next minus.
    int dummy = 0;
    int fontsize1 = (int) ((double)(fontsize) * scale + 0.5);
    dc.SetFont(wxFont(fontsize1, wxFONTFAMILY_MODERN,
                      wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false,
                      parser->GetFontName(TS_VARIABLE)));
    dc.GetTextExtent(wxT("X"), &m_horizontalGap, &dummy);
    m_horizontalGap /= 2;

    m_width = MAX(m_num->GetFullWidth(scale), m_denom->GetFullWidth(scale)) + 2 * m_horizontalGap;
  }
  m_open1->RecalculateWidths(fontsize);
  m_close1->RecalculateWidths(fontsize);
  m_open2->RecalculateWidths(fontsize);
  m_close2->RecalculateWidths(fontsize);
  m_divide->RecalculateWidths(fontsize);
  ResetData();
}
开发者ID:minoki,项目名称:wxmaxima,代码行数:49,代码来源:FracCell.cpp

示例14: Draw

void DiffCell::Draw(CellParser& parser, wxPoint point, int fontsize)
{
  MathCell::Draw(parser, point, fontsize);

  if (DrawThisCell(parser, point) && InUpdateRegion()) {
    wxPoint bs, df;
    df.x = point.x;
    df.y = point.y;
    m_diffCell->DrawList(parser, df, fontsize);

    bs.x = point.x + m_diffCell->GetFullWidth(parser.GetScale()) + 2*MC_CELL_SKIP;
    bs.y = point.y;
    m_baseCell->DrawList(parser, bs, fontsize);
  }
}
开发者ID:belkacem77,项目名称:wxmaxima,代码行数:15,代码来源:DiffCell.cpp

示例15: RecalculateWidths

void ExptCell::RecalculateWidths(CellParser& parser, int fontsize, bool all)
{
  double scale = parser.GetScale();
  m_baseCell->RecalculateWidths(parser, fontsize, true);
  if (m_isBroken)
    m_powCell->RecalculateWidths(parser, fontsize, true);
  else
    m_powCell->RecalculateWidths(parser, MAX(MC_MIN_SIZE, fontsize - EXPT_DEC), true);
  m_width = m_baseCell->GetFullWidth(scale) + m_powCell->GetFullWidth(scale) -
            SCALE_PX(MC_TEXT_PADDING, scale);
  m_exp->RecalculateWidths(parser, fontsize, true);
  m_open->RecalculateWidths(parser, fontsize, true);
  m_close->RecalculateWidths(parser, fontsize, true);
  MathCell::RecalculateWidths(parser, fontsize, all);
}
开发者ID:DevJohan,项目名称:wxmaxima,代码行数:15,代码来源:ExptCell.cpp


注:本文中的CellParser::GetScale方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。