MCPcopy Create free account
hub / github.com/EasyRPG/Player / Adjust

Method Adjust

src/rect.cpp:21–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include "rect.h"
20
21void Rect::Adjust(int max_width, int max_height) {
22 if (x < 0) {
23 width += x;
24 x = 0;
25 }
26 if (y < 0) {
27 height += y;
28 y = 0;
29 }
30 if (x < max_width && y < max_height) {
31 if (max_width < x + width) width = max_width - x;
32 if (max_height < y + height) height = max_height - y;
33 }
34}
35
36void Rect::Adjust(const Rect& rect) {
37 if (x < rect.x) {

Callers 2

RotateZoomOpacityBlitMethod · 0.80
RefreshMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected