Repository: ManimCommunity/manim
File: manim/mobject/types/vectorized_mobject.py (Python)

Code before:
        --------

        .. manim:: MobjectScaleExample
            :save_last_frame:

            class MobjectScaleExample(Scene):
                def construct(self):
                    c1 = Circle(1, RED).set_x(-1)
                    c2 = Circle(1, GREEN).set_x(1)

                    vg = VGroup(c1, c2)
                    vg.set_stroke(width=50)
                    self.add(vg)

                    self.play(
                        c1.animate.scale(.25),
                        c2.animate.scale(.25,
                            scale_stroke=True)
                    )

        See also
        --------
        :meth:`move_to`

        """
        if scale_stroke and self.get_stroke_width and self.set_stroke:
            self.set_stroke(width=abs(scale_factor) * self.get_stroke_width())
            self.set_stroke(
                width=abs(scale_factor) * self.get_stroke_width(background=True),
                background=True,
            )
        super().scale(scale_factor, **kwargs)
        return self

    def fade(self, darkness: float = 0.5, family: bool = True) -> Self:
        factor = 1.0 - darkness
        self.set_fill(opacity=factor * self.get_fill_opacity(), family=False)
        self.set_stroke(opacity=factor * self.get_stroke_opacity(), family=False)
        self.set_background_stroke(
            opacity=factor * self.get_stroke_opacity(background=True),
            family=False,
        )
        super().fade(darkness, family)
        return self

    def get_fill_rgbas(self) -> RGBA_Array_Float | Zeros:
        try:
            return self.fill_rgbas
        except AttributeError:
            return np.zeros((1, 4))


Review comment (suggestion):
These methods exist on VMobject for certain right?
```suggestion
        if scale_stroke:
```

Code after:
        :class:`VMobject`
            ``self``

        Examples
        --------

        .. manim:: MobjectScaleExample
            :save_last_frame:

            class MobjectScaleExample(Scene):
                def construct(self):
                    c1 = Circle(1, RED).set_x(-1)
                    c2 = Circle(1, GREEN).set_x(1)

                    vg = VGroup(c1, c2)
                    vg.set_stroke(width=50)
                    self.add(vg)

                    self.play(
                        c1.animate.scale(.25),
                        c2.animate.scale(.25,
                            scale_stroke=True)
                    )

        See also
        --------
        :meth:`move_to`

        """
        if scale_stroke:
            self.set_stroke(width=abs(scale_factor) * self.get_stroke_width())
            self.set_stroke(
                width=abs(scale_factor) * self.get_stroke_width(background=True),
                background=True,
            )
        super().scale(scale_factor, **kwargs)
        return self

    def fade(self, darkness: float = 0.5, family: bool = True) -> Self:
        factor = 1.0 - darkness
        self.set_fill(opacity=factor * self.get_fill_opacity(), family=False)
        self.set_stroke(opacity=factor * self.get_stroke_opacity(), family=False)
        self.set_background_stroke(
            opacity=factor * self.get_stroke_opacity(background=True),
            family=False,
        )
        super().fade(darkness, family)
        return self

    def get_fill_rgbas(self) -> RGBA_Array_Float | Zeros:
        try: