def mergeRotatedScaledPage(self, page2, rotation, scale):
rotation = math.radians(rotation)
rotating = [[math.cos(rotation), math.sin(rotation),0],
[-math.sin(rotation),math.cos(rotation), 0],
[0, 0, 1]]
scaling = [[scale,0, 0],
[0, scale,0],
[0, 0, 1]]
ctm = utils.matrixMultiply(rotating, scaling)
return self.mergeTransformedPage(page2,
[ctm[0][0], ctm[0][1],
ctm[1][0], ctm[1][1],
ctm[2][0], ctm[2][1]])
##
# This is similar to mergePage, but the stream to be merged is translated
# and scaled by appling a transformation matrix.
#
# @param page2 An instance of {@link #PageObject PageObject} to be merged.
# @param scale The scaling factor
# @param tx The translation on X axis
# @param tx The translation on Y axis
评论列表
文章目录