MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / DrawAllFeatures

Method DrawAllFeatures

src/visual_tool.cpp:272–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270
271template<class FeatureType>
272void VisualTool<FeatureType>::DrawAllFeatures() {
273 wxColour grid_color = to_wx(line_color_secondary_opt->GetColor());
274 gl.SetLineColour(grid_color, 1.0f, 1);
275 wxColour base_fill = to_wx(highlight_color_primary_opt->GetColor());
276 wxColour active_fill = to_wx(highlight_color_secondary_opt->GetColor());
277 wxColour alt_fill = to_wx(line_color_primary_opt->GetColor());
278 for (auto& feature : features) {
279 wxColour fill = base_fill;
280 if (&feature == active_feature)
281 fill = active_fill;
282 else if (sel_features.count(&feature))
283 fill = alt_fill;
284 gl.SetFillColour(fill, 0.3f);
285 feature.Draw(gl);
286 }
287}
288
289template<class FeatureType>
290void VisualTool<FeatureType>::SetSelection(FeatureType *feat, bool clear) {

Callers

nothing calls this directly

Calls 5

GetColorMethod · 0.80
SetLineColourMethod · 0.80
SetFillColourMethod · 0.80
to_wxFunction · 0.70
DrawMethod · 0.45

Tested by

no test coverage detected