@@ -87,49 +87,57 @@ def draw(self, constructor: Constructor) -> None:
87
87
path .update (figure .line_style .style )
88
88
self .svg .add (path )
89
89
90
- for tree in constructor .trees :
91
- tree .draw (self .svg , self .flinger , self .scheme )
92
- for crater in constructor .craters :
93
- crater .draw (self .svg , self .flinger )
90
+ if self .scheme .draw_trees :
91
+ for tree in constructor .trees :
92
+ tree .draw (self .svg , self .flinger , self .scheme )
94
93
95
- self .draw_buildings (constructor , self .configuration .use_building_colors )
94
+ if self .scheme .draw_craters :
95
+ for crater in constructor .craters :
96
+ crater .draw (self .svg , self .flinger )
96
97
97
- for direction_sector in constructor .direction_sectors :
98
- direction_sector .draw (self .svg , self .scheme )
98
+ if self .scheme .draw_buildings :
99
+ self .draw_buildings (
100
+ constructor , self .configuration .use_building_colors
101
+ )
99
102
100
- # All other points
103
+ if self .scheme .draw_directions :
104
+ for direction_sector in constructor .direction_sectors :
105
+ direction_sector .draw (self .svg , self .scheme )
101
106
102
- occupied : Optional [Occupied ]
103
- if self .configuration .overlap == 0 :
104
- occupied = None
105
- else :
106
- occupied = Occupied (
107
- self .flinger .size [0 ],
108
- self .flinger .size [1 ],
109
- self .configuration .overlap ,
110
- )
107
+ # All other points
111
108
112
- nodes : list [Point ] = sorted (
113
- constructor .points , key = lambda x : - x .priority
114
- )
115
- logging .info ("Drawing main icons..." )
116
- for node in nodes :
117
- node .draw_main_shapes (self .svg , occupied )
118
-
119
- logging .info ("Drawing extra icons..." )
120
- for point in nodes :
121
- point .draw_extra_shapes (self .svg , occupied )
122
-
123
- logging .info ("Drawing texts..." )
124
- for point in nodes :
125
- if (
126
- not self .configuration .is_wireframe ()
127
- and self .configuration .label_mode != LabelMode .NO
128
- ):
129
- point .draw_texts (
130
- self .svg , occupied , self .configuration .label_mode
109
+ if self .scheme .draw_nodes :
110
+ occupied : Optional [Occupied ]
111
+ if self .configuration .overlap == 0 :
112
+ occupied = None
113
+ else :
114
+ occupied = Occupied (
115
+ self .flinger .size [0 ],
116
+ self .flinger .size [1 ],
117
+ self .configuration .overlap ,
131
118
)
132
119
120
+ nodes : list [Point ] = sorted (
121
+ constructor .points , key = lambda x : - x .priority
122
+ )
123
+ logging .info ("Drawing main icons..." )
124
+ for node in nodes :
125
+ node .draw_main_shapes (self .svg , occupied )
126
+
127
+ logging .info ("Drawing extra icons..." )
128
+ for point in nodes :
129
+ point .draw_extra_shapes (self .svg , occupied )
130
+
131
+ logging .info ("Drawing texts..." )
132
+ for point in nodes :
133
+ if (
134
+ not self .configuration .is_wireframe ()
135
+ and self .configuration .label_mode != LabelMode .NO
136
+ ):
137
+ point .draw_texts (
138
+ self .svg , occupied , self .configuration .label_mode
139
+ )
140
+
133
141
if self .configuration .show_credit :
134
142
self .draw_credits (constructor .flinger .size )
135
143
0 commit comments