magnifier: Implement vfunc_snapshot

This commit is contained in:
Georges Basile Stavracas Neto 2024-06-14 19:01:40 -03:00
parent 7da7238194
commit add04b4008

View file

@ -75,6 +75,17 @@ const MouseSpriteContent = GObject.registerClass({
textureNode.add_rectangle(actor.get_content_box());
}
vfunc_snapshot(actor, snapshot) {
if (!this._texture)
return;
let [minFilter, magFilter] = actor.get_content_scaling_filters();
snapshot.push_texture_full(this._texture, null, minFilter, magFilter);
snapshot.add_rectangle(actor.get_content_box());
snapshot.pop();
}
get texture() {
return this._texture;
}