def SetDefaultPolygonStyle(layer): ''' Polygon Symbol ''' style = S.getDrawingPolygon() fill_sym = QgsFillSymbol.createSimple({'color': style['COLOR'], 'outline_color': style['OUTLINE_COLOR'], 'outline_style': style['OUTLINE_STYLE'], 'outline_width': style['OUTLINE_WIDTH']}) renderer = QgsSingleSymbolRenderer(fill_sym) layer.setRenderer(renderer) return
def SetDefaultPolygonStyle(layer): """ Polygon Symbol """ style = S.getDrawingPolygon() fill_sym = QgsFillSymbol.createSimple({ "color": style["COLOR"], "outline_color": style["OUTLINE_COLOR"], "outline_style": style["OUTLINE_STYLE"], "outline_width": style["OUTLINE_WIDTH"], }) renderer = QgsSingleSymbolRenderer(fill_sym) layer.setRenderer(renderer)