def scaleBy(self, factor): """ Scales all kerning values by **factor**. **factor** will be an :ref:`type-int-float`, ``tuple`` or ``list``. The first value of the **factor** will be used to scale the kerning values. >>> myKerning.scaleBy(2) >>> myKerning.scaleBy((2,3)) """ factor = normalizers.normalizeTransformationScale(factor) self._scale(factor)
def scaleBy(self, value, origin=None): """ Scale the object. >>> obj.transformBy(2.0) >>> obj.transformBy((0.5, 2.0), origin=(500, 500)) **value** must be an iterable containing two :ref:`type-int-float` values defining the x and y values to scale the object by. **origin** defines the point at with the scale should originate. It must be a :ref:`type-coordinate` or ``None``. The default is ``(0, 0)``. """ value = normalizers.normalizeTransformationScale(value) if origin is None: origin = (0, 0) origin = normalizers.normalizeCoordinateTuple(origin) self._scaleBy(value, origin=origin)
def scaleBy(self, value, origin=None): """ Scale the object. >>> obj.scaleBy(2.0) >>> obj.scaleBy((0.5, 2.0), origin=(500, 500)) **value** must be an iterable containing two :ref:`type-int-float` values defining the x and y values to scale the object by. **origin** defines the point at with the scale should originate. It must be a :ref:`type-coordinate` or ``None``. The default is ``(0, 0)``. """ value = normalizers.normalizeTransformationScale(value) if origin is None: origin = (0, 0) origin = normalizers.normalizeCoordinateTuple(origin) self._scaleBy(value, origin=origin)
def _set_base_scale(self, value): value = normalizers.normalizeTransformationScale(value) self._set_scale(value)
def _get_base_scale(self): value = self._get_scale() value = normalizers.normalizeTransformationScale(value) return value