parent
3fd2ba17b6
commit
ada7af2ab3
|
@ -1,7 +1,7 @@
|
|||
#include "xlib.h"
|
||||
|
||||
#define scx_extract_region(x) (Region)s48_extract_pointer(x)
|
||||
#define scx_enter_region(r) s48_enter_pointer(r)
|
||||
#define scx_extract_region(x) (Region)S48_EXTRACT_POINTER(x)
|
||||
#define scx_enter_region(r) S48_ENTER_POINTER(r)
|
||||
|
||||
/*** create or destroy regions *************************************/
|
||||
|
||||
|
@ -27,22 +27,24 @@ s48_value scx_Empty_Region(s48_value r) {
|
|||
}
|
||||
|
||||
s48_value scx_Equal_Region(s48_value r1, s48_value r2) {
|
||||
Bool res;
|
||||
S48_DECLARE_GC_PROTECT_2(r1, r2);
|
||||
Bool res = XEqualRegion(scx_extract_region(r1),
|
||||
scx_extract_region(r2));
|
||||
res = XEqualRegion(scx_extract_region(r1),
|
||||
scx_extract_region(r2));
|
||||
S48_GC_RETURN(S48_ENTER_BOOLEAN(res));
|
||||
}
|
||||
|
||||
s48_value scx_Point_In_Region(s48_value r, s48_value x, s48_value y) {
|
||||
Bool res;
|
||||
S48_DECLARE_GC_PROTECT_3(r, x, y);
|
||||
Bool res = XPointInRegion(scx_extract_region(r),
|
||||
s48_extract_integer(x),
|
||||
s48_extract_integer(y));
|
||||
res = XPointInRegion(scx_extract_region(r),
|
||||
s48_extract_integer(x),
|
||||
s48_extract_integer(y));
|
||||
S48_GC_RETURN(S48_ENTER_BOOLEAN(res));
|
||||
}
|
||||
|
||||
extern s48_value scx_rect_in_region_type_binding;
|
||||
extern s48_value scx_rect_in_region_types_binding;
|
||||
s48_value scx_rect_in_region_type_binding = S48_FALSE;
|
||||
s48_value scx_rect_in_region_types_binding = S48_FALSE;
|
||||
#define scx_extract_rect_in_region_type(x) \
|
||||
S48_EXTRACT_ENUM(x, scx_rect_in_region_type_binding)
|
||||
#define scx_enter_rect_in_region_type(x) \
|
||||
|
@ -134,7 +136,7 @@ s48_value scx_Polygon_Region(s48_value points, s48_value fill_rule) {
|
|||
points = S48_CDR(points);
|
||||
}
|
||||
r = XPolygonRegion(ps, n, scx_extract_fill_rule(fill_rule));
|
||||
S48_RETURN(scx_enter_region(r));
|
||||
S48_GC_RETURN(scx_enter_region(r));
|
||||
}
|
||||
|
||||
s48_value scx_Clip_Box(s48_value r) {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
(define-enumerated-type rect-in-region-type :rect-in-region-type
|
||||
rect-in-region-type? rect-in-region-types rect-in-region-type-name
|
||||
rect-in-region-type-index
|
||||
(rectangle-in rectangle-out rectangle-part))
|
||||
(out in part))
|
||||
|
||||
(define-exported-binding "scx-rect-in-region-type" :rect-in-region-type)
|
||||
(define-exported-binding "scx-rect-in-region-types" rect-in-region-types)
|
||||
|
|
|
@ -799,11 +799,11 @@
|
|||
;; region.scm *****************************************************
|
||||
create-region set-region destroy-region
|
||||
empty-region? equal-region? point-in-region?
|
||||
((rectangle-in rectangle-out rectangle-part) :enumeration)
|
||||
(rect-in-region-type :enumeration)
|
||||
rect-in-region? intersect-region! intersect-region
|
||||
union-region! union-region union-rect-with-region! union-rect-with-region
|
||||
subtract-region! subtract-region xor-region! xor-region
|
||||
offset-region! shrink-region
|
||||
offset-region! shrink-region!
|
||||
polygon-region clip-box
|
||||
|
||||
;; atom.scm *******************************************************
|
||||
|
|
Loading…
Reference in New Issue