Skip to content

Commit

Permalink
naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
bordoray committed Aug 24, 2023
1 parent a84417d commit aae0fec
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions translator/vector/symbol/marker.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _get_markershape_from(symbol_shape: QgsSimpleMarkerSymbolLayerBase.Shape) ->
)


def _get_horizontal_anchor_from(
def _get_x_position_from(
symbol_anchor_x: QgsMarkerSymbolLayer.HorizontalAnchorPoint,
) -> str:
return {
Expand All @@ -69,7 +69,7 @@ def _get_horizontal_anchor_from(
)


def _get_vertical_anchor_from(
def _get_y_position_from(
symbol_anchor_y: QgsMarkerSymbolLayer.VerticalAnchorPoint,
) -> str:
return {
Expand Down Expand Up @@ -137,10 +137,8 @@ def get_point_symbol_data(
convert_to_point(symbol_layer.offset().x(), symbol_layer.offsetUnit()),
convert_to_point(symbol_layer.offset().y(), symbol_layer.offsetUnit()),
],
"anchor_x": _get_horizontal_anchor_from(
symbol_layer.horizontalAnchorPoint()
),
"anchor_y": _get_vertical_anchor_from(symbol_layer.verticalAnchorPoint()),
"anchor_x": _get_x_position_from(symbol_layer.horizontalAnchorPoint()),
"anchor_y": _get_y_position_from(symbol_layer.verticalAnchorPoint()),
"rotation": symbol_layer.angle(),
"level": symbol_layer.renderingPass(), # renderingPass means symbolLevels
# https://github.com/qgis/QGIS/blob/65d40ee0ce59e761ee2de366ca9a963f35adfcfd/src/core/vector/qgsvectorlayerrenderer.cpp#L702
Expand All @@ -164,10 +162,8 @@ def get_point_symbol_data(
convert_to_point(symbol_layer.offset().x(), symbol_layer.offsetUnit()),
convert_to_point(symbol_layer.offset().y(), symbol_layer.offsetUnit()),
],
"anchor_x": _get_horizontal_anchor_from(
symbol_layer.horizontalAnchorPoint()
),
"anchor_y": _get_vertical_anchor_from(symbol_layer.verticalAnchorPoint()),
"anchor_x": _get_x_position_from(symbol_layer.horizontalAnchorPoint()),
"anchor_y": _get_y_position_from(symbol_layer.verticalAnchorPoint()),
"rotation": symbol_layer.angle(),
"level": symbol_layer.renderingPass(),
"opacity": symbol_opacity,
Expand All @@ -188,10 +184,8 @@ def get_point_symbol_data(
convert_to_point(symbol_layer.offset().x(), symbol_layer.offsetUnit()),
convert_to_point(symbol_layer.offset().y(), symbol_layer.offsetUnit()),
],
"anchor_x": _get_horizontal_anchor_from(
symbol_layer.horizontalAnchorPoint()
),
"anchor_y": _get_vertical_anchor_from(symbol_layer.verticalAnchorPoint()),
"anchor_x": _get_x_position_from(symbol_layer.horizontalAnchorPoint()),
"anchor_y": _get_y_position_from(symbol_layer.verticalAnchorPoint()),
"rotation": symbol_layer.angle(),
"level": symbol_layer.renderingPass(),
"opacity": symbol_opacity,
Expand Down

0 comments on commit aae0fec

Please sign in to comment.