MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / rect

Method rect

src/__init__.py:1245–1262  ·  view source on GitHub ↗

annotation rectangle

(self)

Source from the content-addressed store, hash-verified

1243
1244 @property
1245 def rect(self):
1246 """annotation rectangle"""
1247 if g_use_extra:
1248 val = extra.Annot_rect3( self.this)
1249 else:
1250 val = mupdf.pdf_bound_annot(self.this)
1251 val = Rect(val)
1252
1253 # Caching self.parent_() reduces 1000x from 0.07 to 0.04.
1254 #
1255 p = self.get_parent()
1256 #p = getattr( self, 'parent', None)
1257 #if p is None:
1258 # p = self.parent
1259 # self.parent = p
1260 #p = self.parent_()
1261 val *= p.derotation_matrix
1262 return val
1263
1264 @property
1265 def rect_delta(self):

Callers

nothing calls this directly

Calls 2

get_parentMethod · 0.95
RectClass · 0.85

Tested by

no test coverage detected