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

Code before:
        self.set_stroke(color, family=family)
        return self

    def set_opacity(self, opacity: float, family: bool = True) -> Self:
        self.set_fill(opacity=opacity, family=family)
        self.set_stroke(opacity=opacity, family=family)
        self.set_stroke(opacity=opacity, family=family, background=True)
        return self

    def scale(self, scale_factor: float, scale_stroke: bool = False, **kwargs) -> Self:
        r"""Scale the size by a factor.

        Default behavior is to scale about the center of the vmobject.

        Parameters
        ----------
        scale_factor
            The scaling factor :math:`\alpha`. If :math:`0 < |\alpha| < 1`, the mobject
            will shrink, and for :math:`|\alpha| > 1` it will grow. Furthermore,
            if :math:`\alpha < 0`, the mobject is also flipped.
        scale_stroke
            Boolean determining if the object's outline is scaled when the object is scaled.
            If enabled, and object with 2px outline is scaled by a factor of .5, it will have an outline of 1px.
        kwargs
            Additional keyword arguments passed to
            :meth:`apply_points_function_about_point`.

        Returns
        -------
        :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)

Review comment (suggestion):
Shouldn't this be

```suggestion
            :meth:`~.Mobject.scale`.
```

Code after:
        return self

    def set_color(self, color: ParsableManimColor, family: bool = True) -> Self:
        self.set_fill(color, family=family)
        self.set_stroke(color, family=family)
        return self

    def set_opacity(self, opacity: float, family: bool = True) -> Self:
        self.set_fill(opacity=opacity, family=family)
        self.set_stroke(opacity=opacity, family=family)
        self.set_stroke(opacity=opacity, family=family, background=True)
        return self

    def scale(self, scale_factor: float, scale_stroke: bool = False, **kwargs) -> Self:
        r"""Scale the size by a factor.

        Default behavior is to scale about the center of the vmobject.

        Parameters
        ----------
        scale_factor
            The scaling factor :math:`\alpha`. If :math:`0 < |\alpha| < 1`, the mobject
            will shrink, and for :math:`|\alpha| > 1` it will grow. Furthermore,
            if :math:`\alpha < 0`, the mobject is also flipped.
        scale_stroke
            Boolean determining if the object's outline is scaled when the object is scaled.
            If enabled, and object with 2px outline is scaled by a factor of .5, it will have an outline of 1px.
        kwargs
            Additional keyword arguments passed to
            :meth:`~.Mobject.scale`.

        Returns
        -------
        :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)