[Qgis-developer] Label backgrounds (shape, SVG, drop shadow)
larrys at dakotacarto.com
Mon Apr 8 19:52:53 PDT 2013
Here's an update on the labeling work I've been doing for the past week:
* Label backgrounds (geometric shapes and SVG) have been
implemented/committed, but currently have a couple of loose ends .
* Label drop shadows are essentially functional, and work for label buffers
. I need a couple of days to clean up the overly verbose code, simplify
the logic and make it work for label text and backgrounds. In the GUI and
map canvas screen snaps  you can see an example of the radius
blurring and of the 'global' offset option (there are also debug rectangles
shown). When global is checked for shadow offset, rotated label's drop
shadows are adjusted to match the global offset for the layer (instead of
being relative to the label's rotation). For example, this allows all drop
shadows on all labels, or their buffers/backgrounds, to match what a user
may have setup in a hill shaded raster, i.e. opposite the angle of a
virtual sun. Turning on all these features does slow labeling down, of
* Significantly missing functionality currently occurs in the data defined
aspect of new labeling features. Many of the new features do not have
corresponding data defined options, and the current gui and usage of the
data defined values does not mirror that of the new setup by recently
committed by Dr. Marco H for symbology. Since labeling does not yet have a
rule-based setup, it would be *very good* to have the current data defined
setup for labeling switched over to Marco's method. This will allow
expressions to be used for all labeling options and give users a solid
feature set for labeling to work with until 2.1.
So, I have a couple questions:
Can I push the cleaned up and functional labeling drop shadows work to
master branch in a couple of days, for inclusion in 2.0? It was my
understanding this was part of the labeling background work I was
temporarily allowed to do, but it has taken a couple of days longer than
Does switching over the data defined backend for labeling constitute a new
feature? If not, I'd like to work on it over the next week.
If switching over the data defined backend is considered a new feature, and
not allowed to be committed right now, can I at least work on adding some
of the missing data defined options for labeling?
On Sat, Mar 30, 2013 at 12:18 PM, Andreas Neumann <a.neumann at carto.net>wrote:
> I'd love to have these label backgrounds and drop shadows in QGIS 2.0.
> Makes sense to me to include this work despite feature freeze since a
> major effort was made already to improve labeling in QGIS 2.0.
> so +1 from my side.
> Thank you for your work, Larry.
> Am 30.03.2013 12:32, schrieb Larry Shaffer:
> > Hi,
> > In an effort to bring a basic label background feature into 2.0 before
> > the freeze, I figured out a good approach that makes adding label
> > backgrounds much easier (better late than never, I suppose) . This
> > that adding SVGs and drop shadows for label backgrounds is only an extra
> > couple of days of work.
> > Here's a preliminary gui setup  (not all may be implemented, but most
> > can easily be).
> > An example of generic rounded-corner rectangles (a la web mapping and
> > road shields) with a bit of x/y offset to nicely center the text .
> > And, an example of the 'centering' of the background relative to the
> > contents (background rotated 90 deg relative to text) , regardless of
> > label's offset placement (see pink-text label next to point feature).
> > is a crucial feature for integrating many types of backgrounds.
> > Both examples also show one issue: while labels don't overlap due to
> > collision management, their backgrounds might overlap each other or
> > previously drawn label text. I believe this is fixable, though I don't
> > how long it will take, off hand.
> > So... basically, I'm asking those who make decisions whether I can work
> > another week on this feature, for inclusion in 2.0.
> > 
> >  http://drive.dakotacarto.com/qgis/labeling_background-gui.png
> >  http://drive.dakotacarto.com/qgis/labeling_background-rounded.png
> >  http://drive.dakotacarto.com/qgis/labeling_background-rotation.png
> > Regards,
> > Larry Shaffer
> > Dakota Cartography
> > Black Hills, South Dakota
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer