I have been trying to figure out how to set the transparency of my labels and label buffers in PyQGIS for an application I am building. I am using the "setCustomProperty" class from the QGIS API. I can't find anything in the API documentation that allows for setting transparency. This is possible in the QGIS GUI via a slider, but seemingly impossible in PyQGIS. Here is a snippet of my labeling code:
self.mylayer.setCustomProperty("labeling", "pal") self.mylayer.setCustomProperty("labeling/isExpression", True) self.mylayer.setCustomProperty("labeling/enabled", True) self.mylayer.setCustomProperty("labeling/bufferDraw", True) self.mylayer.setCustomProperty("labeling/bufferSize", "1") self.mylayer.setCustomProperty("labeling/bufferColor", "white") self.mylayer.setCustomProperty("labeling/fontFamily", "Arial")Shouldn't there be a custom property setting for transparency? Like a bufferAlpha or a textAlpha setting or something?
أكثر...
self.mylayer.setCustomProperty("labeling", "pal") self.mylayer.setCustomProperty("labeling/isExpression", True) self.mylayer.setCustomProperty("labeling/enabled", True) self.mylayer.setCustomProperty("labeling/bufferDraw", True) self.mylayer.setCustomProperty("labeling/bufferSize", "1") self.mylayer.setCustomProperty("labeling/bufferColor", "white") self.mylayer.setCustomProperty("labeling/fontFamily", "Arial")Shouldn't there be a custom property setting for transparency? Like a bufferAlpha or a textAlpha setting or something?
أكثر...