Skip to content

MLP223: transparent positive-width stroke captured by Cairo

qual reports MLP223 when a non-empty VMobject path has exact stroke_opacity == 0 but an exact positive stroke width during a certain Cairo animation. The invisible stroke geometry still enters Cairo's path processing on every captured frame.

  • Default severity: info
  • Minimum confidence: high
  • Implementation phase: 3
  • Profiles: Cairo only
  • Fix: none

All of these facts are required:

  • singleton object identity and a proven non-empty path;
  • exact zero stroke opacity and exact positive stroke width at the play;
  • a certain direct target animation with complete write-channel facts;
  • no active mobject or Scene updater; and
  • no current or later style/opacity animation, direct mutation, unknown mutation, or updater registration that could make the stroke visible.

This last gate matters: a transparent stroke used as the start of a later fade is intentional state, not dead stroke work. Unknown identity, style, path topology, future mutation, branch-only capture, and OpenGL profiles all keep the rule silent. Frame counts remain symbolic when duration is unknown.

Wrong

class Demo(Scene):
    def construct(self):
        circle = Circle(stroke_opacity=0, stroke_width=8)
        self.play(circle.animate.shift(RIGHT), run_time=4)
class Demo(Scene):
    def construct(self):
        circle = Circle(stroke_opacity=0, stroke_width=0)
        self.play(circle.animate.shift(RIGHT), run_time=4)