Changeset View
Changeset View
Standalone View
Standalone View
docs/paintingmaps.txt
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | |||||
63 | Before adjusting the map using the Qt-Style Painter-API you usually have | 63 | Before adjusting the map using the Qt-Style Painter-API you usually have | ||
64 | to "initialize" and prepare the map by using the Simple API. | 64 | to "initialize" and prepare the map by using the Simple API. | ||
65 | Creating new geographical features on the map should happen using a | 65 | Creating new geographical features on the map should happen using a | ||
66 | Qt-style Painter-API (which would include the QPainter/ClipPainter API | 66 | Qt-style Painter-API (which would include the QPainter/ClipPainter API | ||
67 | to draw in screen coordinates): | 67 | to draw in screen coordinates): | ||
68 | 68 | | |||
69 | Code snippet: | 69 | Code snippet: | ||
70 | 70 | | |||
71 | bool MarbleTestPlugin::render( GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer ) | 71 | bool MarbleTestPlugin::render(GeoPainter *painter, ViewportParams *viewport, RenderPosition renderPos, GeoSceneLayer * layer) | ||
72 | { | 72 | { | ||
73 | painter->autoMapQuality(); | 73 | painter->autoMapQuality(); | ||
74 | painter->setPen( Qt::red ); | 74 | painter->setPen( Qt::red ); | ||
75 | 75 | | |||
76 | GeoDataCoordinates flensburg( 9.4, 54.8, 0.0, GeoDataCoordinates::Degree ); | 76 | GeoDataCoordinates flensburg( 9.4, 54.8, 0.0, GeoDataCoordinates::Degree ); | ||
77 | GeoDataCoordinates madrid( -3.7, 40.4, 0.0, GeoDataCoordinates::Degree ); | 77 | GeoDataCoordinates madrid( -3.7, 40.4, 0.0, GeoDataCoordinates::Degree ); | ||
78 | 78 | | |||
79 | painter->drawLine( flensburg, madrid ); | 79 | painter->drawLine( flensburg, madrid ); | ||
Show All 19 Lines |