[Marble-devel] Visibility of GeoDataLinearRing

Josh Knox jknox at lauferwind.com
Tue Feb 25 15:02:46 UTC 2014


On 02/13/2014 05:57 AM, Knut Krause wrote:
> Hi,
>
> I added a GeoDataLinearRing to my MarbleWidget to show a selected region. Now
> this ring is just visible at some higher zoom levels. What can I do that my
> ring is always visible?
>
>
> Knut
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel
>


Hi Knut,

I draw various perimeters by stuffing GeoDataLinearRing into a GeoDataPolygon and then drawing that with GeoPainter::drawPolygon();.

As a simple example:

   void KnutsWidget::customPaint(GeoPainter* painter) {

     GeoDataLinearRing points;

     // add some points to the ring
     // ...
     // ...

     // put the points in a polygon
     GeoDataPolygon region;
     region.setOuterBoundary(points);

     painter->drawPolygon(region);
   }

This draws the polygon boundary at all zoom levels for me.

Josh






	


More information about the Marble-devel mailing list