#include <QtGui/QApplication>
#include <marble/MarbleWidget.h>
#include <marble/GeoPainter.h>
#include <marble/GeoDataLineString.h> using namespace Marble; class MyMarbleWidget : public MarbleWidget
{
public:
virtual void customPaint(GeoPainter* painter);
}; void MyMarbleWidget::customPaint(GeoPainter* painter) { GeoDataCoordinates France( 2.2, 48.52, 0.0, GeoDataCoordinates::Degree );
painter->setPen( QColor( , , ) );
painter->drawText( France, "France" ); GeoDataCoordinates Canada( -77.02, 48.52, 0.0, GeoDataCoordinates::Degree );
painter->setPen( QColor( , , ) );
painter->drawText( Canada, "Canada" ); //A line from France to Canada without tessellation GeoDataLineString shapeNoTessellation( NoTessellation );
shapeNoTessellation << France << Canada; painter->setPen( oxygenSkyBlue4 );
painter->drawPolyline( shapeNoTessellation ); //The same line, but with tessellation GeoDataLineString shapeTessellate( Tessellate );
shapeTessellate << France << Canada; painter->setPen( oxygenBrickRed4 );
painter->drawPolyline( shapeTessellate ); //Now following the latitude circles GeoDataLineString shapeLatitudeCircle( RespectLatitudeCircle | Tessellate );
shapeLatitudeCircle << France << Canada; painter->setPen( oxygenForestGreen4 );
painter->drawPolyline( shapeLatitudeCircle );
} int main(int argc, char** argv) { QApplication app(argc,argv); // Create a Marble QWidget without a parent
MarbleWidget *mapWidget = new MyMarbleWidget(); // Load the OpenStreetMap map
mapWidget->setMapThemeId("earth/plain/plain.dgml"); mapWidget->show(); return app.exec();
}

Marble 绘制线的更多相关文章

  1. R绘图 第六篇:绘制线图(ggplot2)

    线图是由折线构成的图形,线图是把散点从左向右用直线连接起来而构成的图形,在以时间序列为x轴的线图中,可以看到数据增长的趋势. geom_line(mapping = NULL, data = NULL ...

  2. Unity3D研究院之游戏对象的访问绘制线与绘制面详解(十七)

    一眨眼学习Unity3D 也有一段时间了,基本已经拿下了这套游戏引擎,回过头来想想以前写的RPG 游戏引擎,越来越发现以前写的就是垃圾.人果然是要不断学习与不断进步,好好学习,天天向上.哇咔咔- 加油 ...

  3. canvas绘制线和矩形

    ###canvas绘制矩形 HTML中的元素canvas只支持一种原生的图形绘制:矩形.所有其他的图形的绘制都至少需要生成一条路径 1.绘制矩形 canvas提供了三种方法绘制矩形: ----> ...

  4. unity绘制线和绘制面

    绘制线条代码,其实就是指定至少两个点,然后赋予贴图即可,不废话,上代码: using UnityEngine; using System.Collections; public class LineT ...

  5. [3D]绘制线

    数据实体: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Sy ...

  6. OpenGL ES 3.0 点,线,三角形绘制形式总结

    OpenGL ES 3.0 顶点     -1,  1, 0, -0.5f,  0, 0,     0, -1, 0,    -1,  0, 0, 0.5f,   0, 0,     1, -1,   ...

  7. WebGL绘制有端头的线

    关于WebGL绘制线原理不明白的小伙伴,可以看看我之前的文章WebGL绘制有宽度的线.这一篇我们主要来介绍端头的绘制,先看效果图. 端头一般被称为lineCap,主要有以下三种形式: butt最简单等 ...

  8. WebGL绘制有宽度的线

    WebGL中有宽度的线一直都是初学者的一道门槛,因为在windows系统中底层的渲染接口都是D3D提供的,所以无论你的lineWidth设置为多少,最终绘制出来的只有一像素.即使在移动端可以设置有宽度 ...

  9. python 绘制点线

    plot(x, y) #默认为蓝色实线 plot(x, y, 'r*') #红色星状标记 plot(x, y, 'go-') #带有圆圈标记的绿线 plot(x, y, 'ks:') #带有正方形标记 ...

随机推荐

  1. 单身福利来了:VR恋人为你量身定制一个女朋友

    相对于传统视频体验,VR视频给人带来了更加真实的体验.特别是对于单身狗来说,能在VR中拥有一个虚拟的恋人可谓是莫大的心灵安慰.近日,上海微雁文化传媒有限公司正式发布了首款养成类手机应用VR恋人. VR ...

  2. maven项目如何引用本地的jar包

    下载该jar包到本地(如下载目录结构为:D:\Users\lu.wang\Downloads\searchservice\searchservice\jar\ttd.search.searchserv ...

  3. 分布式缓存Memcached/memcached/memcache详解及区别

    先来解释下标题中的三种写法:首字母大写的Memcached,指的是Memcached服务器,就是独立运行Memcached的后台服务器,用于存储缓存数据的“容器”.memcached和memcache ...

  4. Html5浏览器端less应用

    之前的一个布局是用rem来做的 我上一段代码 div { margin: 0.833333333rem 0; } /* 去处a标签的下划线*/ a { text-decoration: none; } ...

  5. zabbix 布署实践【4 服务器自动探索发现,并且自动关联模版】

    使用管理员登录zabbix后,在配置---自动发现--创建发现规则 如下:我们的需求是监听办公网内openstack的所有虚拟机,在其VM创建后,自动加到zabbix监控中来,并自动关联监控模版 可以 ...

  6. CodeForces 670F Restore a Number

    模拟. 首先暴力找到答案的位数,然后就是分类讨论输出答案. #pragma comment(linker, "/STACK:1024000000,1024000000") #inc ...

  7. [Q]将图纸转换为JPG、PNG、plt、DWF、DWFx,XPS等格式文件

    如要将图纸打印为图片,请选择“PublishToWeb JPG.pc3”或“PublishToWeb PNG.pc3”打印机. 如要将图纸打印为plt格式文件,请选择“Windows Default ...

  8. 用 monitorix 开启linux图形化监控

    # yum install monitorix # service monitorix starthttp://host:8080/monitorix/

  9. scala实现快速排序

    scala> def qSort(a: List[Int]): List[Int] = { | ) a | else qSort( a.filter(a.head > _ )) ++ | ...

  10. TheSixthWeekJavaText

    加密文档 实验要求编写一个算法加密一串英文字串. 设计思想:对于一个字符串,我们可以用String.charAt()方法依次取出其中的字符元素,组成一个字符数组.由于字符可以转化为short类型变量进 ...