def render(self, **kwargs): for arg_name, arg_value in kwargs.items(): self.__setattr__(arg_name, arg_value) if self.axis.axisNumeric_p: height = self.scheme["font"].dimensions(self.scheme["number-formatter"] % self.value)[1] self.scheme["font"].render( self.scheme["number-formatter"] % self.value, (self.point[0], self.point[1] + self.scheme["margin-top"]), render_utils.dehumanizeRotation(self.scheme["rotation"]), ) else: height = self.scheme["font"].dimensions(self.value)[1] self.scheme["font"].render( self.value, (self.point[0], self.point[1] + self.scheme["margin-top"]), render_utils.dehumanizeRotation(self.scheme["rotation"]), )
def render(self, **kwargs): for arg_name, arg_value in kwargs.items(): self.__setattr__(arg_name, arg_value) if self.axis.type == "dependent": height = self.scheme["font"].dimensions(self.scheme["formatter"] % self.value, self.scheme["rotation"])[1] self.scheme["font"].render( self.scheme["formatter"] % self.value, (self.point[0] - self.scheme["margin-right"], self.point[1] - height / 2), render_utils.dehumanizeRotation(self.scheme["rotation"]), )