Using live layer effects
Live layer effects provide advanced cartographic effects for QGIS maps. These drawing effects go beyond the traditional GIS maps into the realm of map illustrations to add pleasing visualizations, including blur effects, inner and outer glows, and drop shadows. In this recipe, we'll add the inner glow and drop shadow live layer effects to a polygon layer.
Getting ready
Download the following zipped shapefile and extract it to a directory named ms
in your qgis_data
directory:
https://github.com/GeospatialPython/Learn/raw/master/Mississippi.zip
How to do it...
We will create a layer based on the shapefile. Then we'll build three symbol layers for the base fill color, the inner glow, and the drop shadow. We'll add those symbol layers to the layer's base symbol and finally, add the layer to the map:
First, we need to import the PyQt GUI library to handle color objects:
from PyQt4.QtGui import *
Next, we'll create the shapefile layer:
lyr = QgsVectorLayer...