MCPcopy Create free account
hub / github.com/WayfireWM/wayfire / init

Method init

plugins/animate/fire/fire.cpp:234–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void FireAnimation::init(wayfire_view view, wf::animation_description_t dur, wf::animate::animation_type type)
235{
236 this->view = view;
237
238 auto bbox = view->get_transformed_node()->get_bounding_box();
239 dur.length_ms *= fire_duration_mod_for_height(bbox.height);
240 this->progression = wf::animation::simple_animation_t(
241 wf::create_option<wf::animation_description_t>(dur));
242 this->progression.animate(0, 1);
243
244 if (type & WF_ANIMATE_HIDING_ANIMATION)
245 {
246 this->progression.flip();
247 }
248
249 name = "animation-fire-" + std::to_string(type);
250
251 auto tr = std::make_shared<fire_node_t>();
252 view->get_transformed_node()->add_transformer(
253 tr, wf::TRANSFORMER_HIGHLEVEL + 1, name);
254}
255
256bool FireAnimation::step()
257{

Callers

nothing calls this directly

Calls 3

get_bounding_boxMethod · 0.45
add_transformerMethod · 0.45

Tested by

no test coverage detected