本文整理汇总了C++中cur_attr函数的典型用法代码示例。如果您正苦于以下问题:C++ cur_attr函数的具体用法?C++ cur_attr怎么用?C++ cur_attr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了cur_attr函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: push_attr
void GraphAggRenderer::fillRect(Point *ulCorner, Point *lrCorner,
Color *color)
{
//qDebug() << QString("%1").arg(__PRETTY_FUNCTION__);
agg::path_storage &ps = m_data->ps;
unsigned idx = ps.start_new_path();
ps.move_to(ulCorner->x(), ulCorner->y());
ps.line_to(lrCorner->x(), ulCorner->y());
ps.line_to(lrCorner->x(), lrCorner->y());
ps.line_to(ulCorner->x(), lrCorner->y());
ps.line_to(ulCorner->x(), ulCorner->y());
ps.end_poly();
// 保存属性
push_attr();
m_data->as.add(path_attributes(cur_attr(), idx));
//保存idx值
path_attributes attr = cur_attr();
attr.stroke_flag = false;
attr.fill_flag = true;
attr.fill_color = agg::rgba8(color->red(),
color->green(), color->blue(), color->alpha());
attr.index = idx;
m_data->as[m_data->as.size() -1] = attr;
pop_attr();
updateBbox();
}
开发者ID:ongbe,项目名称:xchart,代码行数:31,代码来源:graph_agg_renderer1.cpp
示例2: cur_attr
//------------------------------------------------------------------------
void path_renderer::fill_gradient(svg_gradient& gradient)
{
path_attributes& cur = cur_attr();
if (cur.gradient != nullptr) {
delete cur.gradient;
}
cur.gradient = gradient.clone();
}
开发者ID:aevum,项目名称:libgdx-cpp,代码行数:10,代码来源:agg_svg_path_renderer.cpp
示例3: exception
//------------------------------------------------------------------------
void path_renderer::end_path()
{
if(m_attr_storage.size() == 0)
{
throw exception("end_path : The path was not begun");
}
path_attributes attr = cur_attr();
unsigned idx = m_attr_storage[m_attr_storage.size() - 1].index;
attr.index = idx;
m_attr_storage[m_attr_storage.size() - 1] = attr;
pop_attr();
}
开发者ID:bmharper,项目名称:xo,代码行数:13,代码来源:agg_svg_path_renderer.cpp
示例4: cur_attr
void path_renderer::set_gradient_brush_to_path(const char* gr_id)
{
if(m_all_gradients.size() == 0)
return;
path_attributes& attr = cur_attr();
unsigned cnt = m_all_gradients.size();
for (unsigned i=0;i<cnt;i++)
{
if (strcmp(m_all_gradients[i].id_string, gr_id) == 0)
{
attr.gradient_brush = &m_all_gradients[i];
break;
}
}
}
开发者ID:ONLYOFFICE,项目名称:core,代码行数:15,代码来源:agg_svg_path_renderer.cpp
示例5: gdx_log_error
//------------------------------------------------------------------------
void path_renderer::end_path()
{
if(m_attr_storage.size() == 0)
{
gdx_log_error("gdx","end_path : The path was not begun");
}
path_attributes& attr = cur_attr();
unsigned idx = m_attr_storage[m_attr_storage.size() - 1].index;
attr.index = idx;
m_attr_storage[m_attr_storage.size() - 1] = attr;
if(attr.gradient) {
if (m_attr_storage[m_attr_storage.size() - 1].gradient) {
delete m_attr_storage[m_attr_storage.size() - 1].gradient;
}
m_attr_storage[m_attr_storage.size() - 1].gradient = attr.gradient->clone();
}
pop_attr();
}
开发者ID:aevum,项目名称:libgdx-cpp,代码行数:23,代码来源:agg_svg_path_renderer.cpp
示例6: push_attr
//------------------------------------------------------------------------
void path_renderer::begin_path()
{
push_attr();
unsigned idx = m_storage.start_new_path();
m_attr_storage.add(path_attributes(cur_attr(), idx));
}
开发者ID:aevum,项目名称:libgdx-cpp,代码行数:7,代码来源:agg_svg_path_renderer.cpp
注:本文中的cur_attr函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论