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


C++ Poly::setWeightBold方法代码示例

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


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

示例1: insert_cell

  virtual bool insert_cell(const Cell& cell,
			   const std::string& mode,
			   const std::string& separator) {
    bool bold = false;
    int rr = 0, gg = 0, bb = 0;
    if (mode=="+++") {
      rr = HALF_COLOR;
      gg = FULL_COLOR;
      bb = HALF_COLOR;
      bold = true;
    } else if (mode=="---") {
      rr = FULL_COLOR;
      gg = HALF_COLOR;
      bb = HALF_COLOR;
    } else if (mode=="->") {
      rr = HALF_COLOR;
      gg = HALF_COLOR;
      bb = FULL_COLOR;
      bold = true;
    }
    if (rr!=0||gg!=0||bb!=0) {
      Poly<Appearance> appear = sheet.getCellAppearance(x,y);
      if (appear.isValid()) {
	appear->begin();
	appear->setBackgroundRgb16(rr,gg,bb,
				   AppearanceRange::full());
	if (bold) {
	  appear->setWeightBold(true,AppearanceRange::full());
	}
	appear->end();
      }
    }
    x++;
    return true;
  }
开发者ID:3615pipou,项目名称:coopy,代码行数:35,代码来源:Highlighter.cpp

示例2: begin_row

  virtual bool begin_row(const std::string& mode) {
    row_mode = mode;
    bool bold = false;
    int rr = 0, gg = 0, bb = 0;
    if (row_mode=="+++") {
      rr = HALF_COLOR;
      gg = FULL_COLOR;
      bb = HALF_COLOR;
      bold = true;
    } else if (row_mode=="---") {
      rr = FULL_COLOR;
      gg = HALF_COLOR;
      bb = HALF_COLOR;
    } else if (row_mode=="!") {
      rr = HALF_COLOR;
      gg = HALF_COLOR;
      bb = HALF_COLOR;
    } else if (row_mode=="@@") {
      rr = HALF_COLOR;
      gg = FULL_COLOR;
      bb = FULL_COLOR;
      bold = true;
    }
    if (rr!=0||gg!=0||bb!=0) {
      Poly<Appearance> appear = sheet.getRowAppearance(y);
      if (appear.isValid()) {
	appear->begin();
	appear->setBackgroundRgb16(rr,gg,bb,
				   AppearanceRange::full());
	if (bold) {
	  appear->setWeightBold(true,AppearanceRange::full());
	}
	appear->end();
      }
    }
    return true;
  }
开发者ID:3615pipou,项目名称:coopy,代码行数:37,代码来源:Highlighter.cpp


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