[Marble-devel] Review Request 124498: Properly placed street labels with font style and color settings.

Torsten Rahn tackat at kde.org
Tue Aug 4 18:54:23 UTC 2015



> On Juli 28, 2015, 4:30 nachm., Torsten Rahn wrote:
> > src/lib/marble/GeoPainter.h, line 470
> > <https://git.reviewboard.kde.org/r/124498/diff/2/?file=388402#file388402line470>
> >
> >     This should go into GeoPainterPrivate. That's what it's for.
> 
> Dávid Kolozsvári wrote:
>     I can't really put this function in GeoPainterPrivate, unless I supply the painter through the parameter list:
>     `void drawTextRotated( GeoPainter* painter, const QPointF &startPoint, qreal angle, const QString &text );`
>     which seems a little odd to me.

Are you familiar with the d-pointer pattern and its use? 
https://wiki.qt.io/D-Pointer
The only thing you need here is a q-pointer and it doesn't need to be passed with the parameter list (check the link above).


> On Juli 28, 2015, 4:30 nachm., Torsten Rahn wrote:
> > src/lib/marble/GeoPainter.h, line 471
> > <https://git.reviewboard.kde.org/r/124498/diff/2/?file=388402#file388402line471>
> >
> >     Same.
> 
> Dávid Kolozsvári wrote:
>     As I see, every method in GeoPainterPrivate is static, I guess for performance reasons. This should be static too?

Making it static looks fine to me.


- Torsten


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124498/#review83104
-----------------------------------------------------------


On Juli 28, 2015, 1:54 nachm., Dávid Kolozsvári wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124498/
> -----------------------------------------------------------
> 
> (Updated Juli 28, 2015, 1:54 nachm.)
> 
> 
> Review request for Marble.
> 
> 
> Repository: marble
> 
> 
> Description
> -------
> 
> With this patch, the street labels are renedered properly in OSM Vector Tiles. For each type of OSM way, a custom font style and color can be defined. They even follow the curvatures of the streets without any major performance impact.
> As for the font styles, I welcome any suggestions in the commemnts.
> 
> 
> Diffs
> -----
> 
>   src/lib/marble/ClipPainter.h 42b73c0 
>   src/lib/marble/ClipPainter.cpp 473436e 
>   src/lib/marble/GeoPainter.h 7a757b9 
>   src/lib/marble/GeoPainter.cpp d04138c 
>   src/lib/marble/geodata/data/GeoDataFeature.h ea23cd8 
>   src/lib/marble/geodata/data/GeoDataFeature.cpp 6f330fb 
>   src/lib/marble/geodata/data/GeoDataFeature_p.h 496c356 
>   src/lib/marble/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp 4320c07 
>   src/lib/marble/layers/GeometryLayer.cpp 9eb3f50 
> 
> Diff: https://git.reviewboard.kde.org/r/124498/diff/
> 
> 
> Testing
> -------
> 
> I was worried about the performance impact, because my initial idea was too slow, but after several changes, this version works pretty good.
> 
> 
> Thanks,
> 
> Dávid Kolozsvári
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/marble-devel/attachments/20150804/cd997171/attachment.html>


More information about the Marble-devel mailing list