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