2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: (AROS only) Graphics function NewRectRegion()
8 #include "graphics_intern.h"
9 #include <graphics/regions.h>
10 #include <clib/macros.h>
11 #include "intregions.h"
13 /*****************************************************************************
16 #include <proto/graphics.h>
18 AROS_LH4(struct Region
*, NewRectRegion
,
21 AROS_LHA(WORD
, MinX
, D0
),
22 AROS_LHA(WORD
, MinY
, D1
),
23 AROS_LHA(WORD
, MaxX
, D2
),
24 AROS_LHA(WORD
, MaxY
, D3
),
27 struct GfxBase
*, GfxBase
, 194, Graphics
)
30 Creates a new rectangular Region
33 MinX, MinY, MaxX, MaxY - The extent of the Rect
36 Pointer to the newly created Region. NULL on failure.
39 This function does not exist in AmigaOS.
40 It does basically the same as:
42 struct Rectangle rect;
43 struct Region *region;
51 OrRectRegion(region, &rect);
58 NewRegion() OrRectRegion()
63 15-12-2000 stegerg implemented
65 *****************************************************************************/
69 struct Region
*region
;
70 struct RegionRectangle
*rr
;
72 if ((region
= NewRegion()))
74 struct RegionRectangle
*last
= NULL
;
76 if ((rr
= _NewRegionRectangle(&last
, GfxBase
)))
78 region
->bounds
.MinX
= MinX
;
79 region
->bounds
.MinY
= MinY
;
80 region
->bounds
.MaxX
= MaxX
;
81 region
->bounds
.MaxY
= MaxY
;
85 rr
->bounds
.MaxX
= MaxX
- MinX
;
86 rr
->bounds
.MaxY
= MaxY
- MinY
;
88 region
->RegionRectangle
= rr
;
92 DisposeRegion(region
);
101 } /* NewRectRegion */