Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
- call reserve on container classes where applicable
- make sure Q_FOREACH uses references
- remove dynamic casts to base classes
- fix some implicit bool conversions
This reverts commit fe9461be05043daf34057a85e57424f99eeae43d.
The commit was originally added for a label based feature which needed
to be reworked after recent labeling changes. Reverting this commit
to avoid polluting the API.
Previously only the option to limit the scale range of the scaling
was available. Now you can also choose to limit the corresponding
rendered size in mm.
This means that symbol selectors can be aware of the correct variable
scope and values for both populating expression builder widgets and
for symbol previews.
The rotation is no longer saved in the Qgs*SymbolRendererV2 but in the
QgsMarkerSymbolV2 in a QgsDataDefined. This commit fixes the legacy API and
redirects calls to the new API.
The crashes would happen after some time when browsing the map,
especially when size of SVGs is in map units. This was due to wrong
removal of deleted cache entries where cache entry key would be
different from SVG file's path, thus not removing the entry that
got deleted. Now explicitly keeping the lookup key in the entry
to make sure this does not happen.
Related issues: #9959, #8883
(under the layer properties, rendering tab)
So why would you want this? Well, extremely detailed layers (eg
polygon layers with a huge number of nodes) can cause composer
exports in PDF/SVG format to be huge as all nodes are included in
the exported file. This can also make the resultant file very slow
to work with/open in other programs (*cough* Inkscape *cough*).
Now, these you can force these layers to be rasterised so that the
exported files won't have to include all the nodes contained in these
layers. (Before you could also do this by forcing the composer to
export as a raster, but that was an all-or-nothing solution).
The ideal solution would be a simplification option for composer
exports which would simplify the layers by removing redundant points
at the export DPI, but this is an easy workaround for now.
The graduated symbol renderer now allows to use varying size instead of
varying color.
The classification remains the same an tabbed size/color in the gui
allows the use to choose one type or the other.
This option (located under the symbol advanced menu) disables the
automatic clipping of lines/polygons to the canvas extent. In
some cases this clipping results in unfavourable symbology (eg
centroid fills where the centroid must always be the actual
feature's centroid). (fix#9757)
This commit adds a new framework for implementing paint effects, which
modify the results of QPainter operations to apply visual effects
such as drop shadows and blurs.
The initial implementation allows for effects to be applied to entire
layers and individual symbol layers.
Included are a drop shadow, inner shadow, blur, inner glow, outer glow,
colorise and transform effect. A "stack" effect is also implemented
which allows other paint effects to be combined in various ways.
Sponsored by hundreds of generous kickstarter contributors!
The line symbol layer as been refactored to avoid code duplication and
expose the offset and offset units in the base class. Note that
the added functions in the base class where already defined in all
child classes.