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


C++ Projection::GetHeight方法代码示例

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


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

示例1: DrawGround

  void MapPainterOpenGL::DrawGround(const Projection& projection,
                                    const MapParameter& /*parameter*/,
                                    const FillStyle& style)
  {
    glColor4d(style.GetFillColor().GetR(),
              style.GetFillColor().GetG(),
              style.GetFillColor().GetB(),
              style.GetFillColor().GetA());

    glBegin(GL_QUADS);
    glVertex3d(0,projection.GetHeight(),0.0);                     // Top Left
    glVertex3d(projection.GetWidth(),projection.GetHeight(),0.0); // Top Right
    glVertex3d(projection.GetWidth(),0.0,0.0);                    // Bottom Right
    glVertex3d(0,0,0.0);                                          // Bottom Left
    glEnd();
  }
开发者ID:Dushistov,项目名称:libosmscout,代码行数:16,代码来源:MapPainterOpenGL.cpp

示例2: DrawGround

  void MapPainterAgg::DrawGround(const Projection& projection,
                                 const MapParameter& parameter,
                                 const FillStyle& style)
  {
    agg::path_storage path;

    path.move_to(0,0);
    path.line_to(projection.GetWidth(),0);
    path.line_to(projection.GetWidth(),projection.GetHeight());
    path.line_to(0, projection.GetHeight());
    path.close_polygon();

    renderer_aa->color(agg::rgba(style.GetFillColor().GetR(),
                                 style.GetFillColor().GetG(),
                                 style.GetFillColor().GetB(),
                                 1));

    rasterizer->filling_rule(agg::fill_non_zero);
    rasterizer->add_path(path);
    agg::render_scanlines(*rasterizer,*scanlineP8,*renderer_aa);
  }
开发者ID:AQbernhard,项目名称:OSMScout-ubuntu,代码行数:21,代码来源:MapPainterAgg.cpp

示例3: DrawMap

bool MapPainterSVG::DrawMap(const Projection& projection,
                            const MapParameter& parameter,
                            const MapData& data,
                            std::ostream& stream)
{
    this->stream.rdbuf(stream.rdbuf());
    typeConfig=styleConfig->GetTypeConfig();

    WriteHeader(projection.GetWidth(),projection.GetHeight());

    Draw(projection,
         parameter,
         data);

    WriteFooter();

    fillStyleNameMap.clear();
    lineStyleNameMap.clear();

    return true;
}
开发者ID:OgreTransporter,项目名称:libosmscout,代码行数:21,代码来源:MapPainterSVG.cpp

示例4: DrawGround

void MapPainterSVG::DrawGround(const Projection& projection,
                               const MapParameter& parameter,
                               const FillStyle& style)
{
    stream << "    <rect x=\"" << 0 << "\" y=\"" << 0 << "\" width=\"" << projection.GetWidth() << "\" height=\"" << projection.GetHeight() << "\"" << std::endl;
    stream << "          fill=\"" << GetColorValue(style.GetFillColor()) << "\"" << "/>" << std::endl;
}
开发者ID:OgreTransporter,项目名称:libosmscout,代码行数:7,代码来源:MapPainterSVG.cpp


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