@@ -330,6 +330,8 @@ def equalise(self) -> None:
330
330
x , y = self ._projection_data .rect .x , self ._projection_data .rect .y
331
331
self ._projection_data .rect = XYWH (x , y , self .viewport_width , self .viewport_height )
332
332
333
+ equalize = equalise
334
+
333
335
def match_window (
334
336
self ,
335
337
viewport : bool = True ,
@@ -348,8 +350,8 @@ def match_window(
348
350
On by default
349
351
scissor: Flag whether to also equalize the scissor box to the viewport.
350
352
On by default
351
- position: Flag whether to also center the camera to the viewport.
352
- Off by default
353
+ position: Flag whether to position the camera so that (0.0, 0.0) is in
354
+ the bottom-left
353
355
aspect: The ratio between width and height that the viewport should
354
356
be constrained to. If unset then the viewport just matches the window
355
357
size. The aspect ratio describes how much larger the width should be
@@ -382,8 +384,8 @@ def match_target(
382
384
match the render target.
383
385
The projection center stays fixed, and the new projection matches only in size.
384
386
scissor: Flag whether to update the scissor value.
385
- position: Flag whether to also center the camera to the value.
386
- Off by default
387
+ position: Flag whether to position the camera so that (0.0, 0.0) is in
388
+ the bottom-left
387
389
aspect: The ratio between width and height that the value should
388
390
be constrained to. i.e. for an aspect ratio of ``4:3`` you should
389
391
input ``4.0/3.0`` or ``1.33333...``. Cannot be equal to zero.
@@ -424,8 +426,8 @@ def update_values(
424
426
projection: Flag whether to equalize the size of the projection to match the value.
425
427
The projection center stays fixed, and the new projection matches only in size.
426
428
scissor: Flag whether to update the scissor value.
427
- position: Flag whether to also center the camera to the value.
428
- Off by default
429
+ position: Flag whether to position the camera so that (0.0, 0.0) is in
430
+ the bottom-left
429
431
aspect: The ratio between width and height that the value should
430
432
be constrained to. i.e. for an aspect ratio of ``4:3`` you should
431
433
input ``4.0/3.0`` or ``1.33333...``. Cannot be equal to zero.
@@ -451,7 +453,7 @@ def update_values(
451
453
self .scissor = value
452
454
453
455
if position :
454
- self .position = value . center
456
+ self .position = - self . _projection_data . left , - self . _projection_data . bottom
455
457
456
458
def aabb (self ) -> Rect :
457
459
"""
0 commit comments