本文整理汇总了Python中sample.Overload.drawText方法的典型用法代码示例。如果您正苦于以下问题:Python Overload.drawText方法的具体用法?Python Overload.drawText怎么用?Python Overload.drawText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sample.Overload
的用法示例。
在下文中一共展示了Overload.drawText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testDrawTextRectFStrEcho
# 需要导入模块: from sample import Overload [as 别名]
# 或者: from sample.Overload import drawText [as 别名]
def testDrawTextRectFStrEcho(self):
overload = Overload()
self.assertEqual(overload.drawText(RectF(), Str()), Overload.Function4)
self.assertEqual(overload.drawText(RectF(), ''), Overload.Function4)
self.assertEqual(overload.drawText(RectF(), Str(), Echo()), Overload.Function4)
self.assertEqual(overload.drawText(RectF(), '', Echo()), Overload.Function4)
self.assertEqual(overload.drawText(Rect(), Str()), Overload.Function4)
self.assertEqual(overload.drawText(Rect(), ''), Overload.Function4)
self.assertEqual(overload.drawText(Rect(), Str(), Echo()), Overload.Function4)
self.assertEqual(overload.drawText(Rect(), '', Echo()), Overload.Function4)
示例2: testDrawTextPointAndStr
# 需要导入模块: from sample import Overload [as 别名]
# 或者: from sample.Overload import drawText [as 别名]
def testDrawTextPointAndStr(self):
overload = Overload()
self.assertEqual(overload.drawText(Point(), Str()), Overload.Function0)
self.assertEqual(overload.drawText(Point(), ''), Overload.Function0)
self.assertEqual(overload.drawText(PointF(), Str()), Overload.Function1)
self.assertEqual(overload.drawText(PointF(), ''), Overload.Function1)
示例3: testDrawTextIntIntIntIntStr
# 需要导入模块: from sample import Overload [as 别名]
# 或者: from sample.Overload import drawText [as 别名]
def testDrawTextIntIntIntIntStr(self):
overload = Overload()
self.assertEqual(overload.drawText(1, 2, 3, 4, 5, Str()), Overload.Function6)
self.assertEqual(overload.drawText(1, 2, 3, 4, 5, ''), Overload.Function6)
示例4: testDrawTextRectIntStr
# 需要导入模块: from sample import Overload [as 别名]
# 或者: from sample.Overload import drawText [as 别名]
def testDrawTextRectIntStr(self):
overload = Overload()
self.assertEqual(overload.drawText(Rect(), 1, Str()), Overload.Function2)
self.assertEqual(overload.drawText(Rect(), 1, ''), Overload.Function2)
self.assertEqual(overload.drawText(RectF(), 1, Str()), Overload.Function3)
self.assertEqual(overload.drawText(RectF(), 1, ''), Overload.Function3)