Identity (アイデンティティ)#

アイデンティティは、何もアクションを実行しない Matrix (マトリックス) で、構文がマトリックスを必要とするが実際の変換が必要ない場合に使用されます。それは pymupdf.Matrix(1, 0, 0, 1, 0, 0) の形をしています。

アイデンティティは、定数であり、変更できない「不変」のオブジェクトです。そのため、すべてのマトリックスのプロパティは読み取り専用であり、そのメソッドは無効になっています。

変更可能な アイデンティティマトリックスが必要な場合、次の文のいずれかを使用してください:

>>> m = pymupdf.Matrix(1, 0, 0, 1, 0, 0)  # specify the values
>>> m = pymupdf.Matrix(1, 1)              # use scaling by factor 1
>>> m = pymupdf.Matrix(0)                 # use rotation by zero degrees
>>> m = pymupdf.Matrix(pymupdf.Identity)     # make a copy of Identity

This software is provided AS-IS with no warranty, either express or implied. This software is distributed under license and may not be copied, modified or distributed except as expressly authorized under the terms of that license. Refer to licensing information at artifex.com or contact Artifex Software Inc., 39 Mesa Street, Suite 108A, San Francisco CA 94129, United States for further information.

Discord logo