Clipper

Overview

Clipper là một lớp trong Aspose.Page FOSS cho Python. Dòng thừa kế từ: ClipperBase.

Khóa học Clipper cung cấp các phương pháp như execute() và add_edge_to_sel() để thực hiện clip polygon và quản lý edge.

Khóa học này cung cấp 116 phương pháp để làm việc với các đối tượng Clipper trong các chương trình Python. Các phương pháp có sẵn bao gồm: __init__, add_bounds_to_lml, add_edge_to_sel, add_ghost_join, add_join, add_local_max_poly, add_local_min_poly, add_out_pt, add_path, add_paths, all_horizontal, append_polygon,và 104 phương pháp bổ sung. Tất cả các thành viên công cộng đều có thể truy cập bất kỳ ứng dụng Python nào sau khi cài đặt Aspose.Page FOSS cho gói Python. Tài sản : active_edges, clip_fill_type, clip_type, current_lm, edges, execute_locked,Và 14 nhiều hơn nữa.

Properties

NameTypeAccessDescription
scanbeamOptional[Scanbeam]ReadGửi Scanbeam.
active_edgesOptional[TEdge]ReadNhận được những cạnh hoạt động.
sorted_edgesOptional[TEdge]ReadGặp những ngón tay được phân loại.
intersect_nodesOptional[IntersectNode]ReadGặp các nút intersect.
execute_locked``ReadNgười bị trục xuất đóng cửa.
using_polytree``ReadSử dụng Polytrate.
poly_outsList[OutRec]ReadĐưa ra poly.
joinsList[Join]ReadNhận được các liên kết.
ghost_joinsList[Join]ReadPhù thủy tham gia.
reverse_solution``ReadCó giải pháp ngược lại.
strictly_simple``ReadNhận được điều đơn giản.
preserve_collinear``ReadĐặt được bộ đồi bảo tồn.
clip_type``ReadNhận loại clip.
clip_fill_type``ReadGets clip fill type.
subj_fill_type``ReadNhận subj fill loại.
minima_listOptional[LocalMinima]ReadNhận danh sách tối thiểu.
current_lmOptional[LocalMinima]ReadNhận được lm hiện tại.
edgesList[List[TEdge]]ReadGặp những cạnh.
use_full_range``ReadSử dụng đầy đủ.
has_open_paths``ReadCó những con đường mở.

Methods

SignatureDescription
__init__(init_options: int)
clear()
reset()
insert_scanbeam(y: int)
execute(clip_type: int, solution: List[List[IntPoint]], subj_fill: int, clip_fill: int)bool
execute_internal()bool
pop_scanbeam()int
dispose_all_poly_pts()
dispose_out_rec(index: int)
dispose_out_pts(pp: OutPt)
add_join(op1: OutPt, op2: OutPt, off_pt: IntPoint)
add_ghost_join(op: OutPt, off_pt: IntPoint)
insert_local_minima_into_ael(bot_y: int)
insert_edge_into_ael(edge: TEdge, start_edge: Optional[TEdge])
e2_inserts_before_e1(e1: TEdge, e2: TEdge)bool
is_even_odd_fill_type(edge: TEdge)bool
is_even_odd_alt_fill_type(edge: TEdge)bool
is_contributing(edge: TEdge)bool
set_winding_count(edge: TEdge)Đặt giá trị số winding.
add_edge_to_sel(edge: TEdge)
copy_ael_to_sel()
swap_positions_in_ael(edge1: TEdge, edge2: TEdge)
swap_positions_in_sel(edge1: TEdge, edge2: TEdge)
add_local_max_poly(e1: TEdge, e2: TEdge, pt: IntPoint)
add_local_min_poly(e1: TEdge, e2: TEdge, pt: IntPoint)OutPt
create_out_rec()OutRec
add_out_pt(e: TEdge, pt: IntPoint)OutPt
swap_points(pt1: IntPoint, pt2: IntPoint)tuple[IntPoint, IntPoint]
horz_segments_overlap(pt1a: IntPoint, pt1b: IntPoint, pt2a: IntPoint, pt2b: IntPoint)bool
insert_poly_pt_between(p1: OutPt, p2: OutPt, pt: IntPoint)OutPt
set_hole_state(e: TEdge, out_rec: OutRec)Đặt giá trị của hố nhà nước.
get_dx(pt1: IntPoint, pt2: IntPoint)float
first_is_bottom_pt(btm_pt1: OutPt, btm_pt2: OutPt)bool
get_bottom_pt(pp: OutPt)OutPt
get_lowermost_rec(out_rec1: OutRec, out_rec2: OutRec)OutRec
param1_right_of_param2(out_rec1: OutRec, out_rec2: OutRec)bool
get_out_rec(idx: int)OutRec
append_polygon(e1: TEdge, e2: TEdge)
reverse_poly_pt_links(pp: OutPt)
swap_sides(edge1: TEdge, edge2: TEdge)
swap_poly_indexes(edge1: TEdge, edge2: TEdge)
intersect_edges(e1: TEdge, e2: TEdge, pt: IntPoint, protect: bool)
delete_from_ael(e: TEdge)
delete_from_sel(e: TEdge)
update_edge_into_ael(e: TEdge)TEdge
process_horizontals(is_top_of_scanbeam: bool)
get_horz_direction(horz_edge: TEdge)tuple[int, int, int]
prepare_horz_joins(horz_edge: TEdge, is_top_of_scanbeam: bool)
process_horizontal(horz_edge: TEdge, is_top_of_scanbeam: bool)
get_next_in_ael(e: TEdge, direction: int)Optional[TEdge]
is_minima(e: TEdge)bool
is_maxima(e: TEdge, y: float)bool
is_intermediate(e: TEdge, y: float)bool
get_maxima_pair(e: TEdge)Optional[TEdge]
process_intersections(bot_y: int, top_y: int)bool
build_intersect_list(bot_y: int, top_y: int)
edges_adjacent(inode: IntersectNode)bool
fixup_intersection_order()bool
process_intersect_list()
round(value: float)int
top_x(edge: TEdge, current_y: int)int
insert_intersect_node(e1: TEdge, e2: TEdge, pt: IntPoint)
swap_intersect_nodes(int1: IntersectNode, int2: IntersectNode)
intersect_point(edge1: TEdge, edge2: TEdge, ip: IntPoint)bool
dispose_intersect_nodes()
process_edges_at_top_of_scanbeam(top_y: int)
do_maxima(e: TEdge)
reverse_paths(polys: List[List[IntPoint]])
orientation(poly: List[IntPoint])bool
point_count(pts: Optional[OutPt])int
build_result(polyg: List[List[IntPoint]])
fixup_out_polygon(out_rec: OutRec)
dup_out_pt(out_pt: OutPt, insert_after: bool)OutPt
get_overlap(a1: int, a2: int, b1: int, b2: int)Optional[tuple[int, int]]
join_horz(op1: OutPt, op1b: OutPt, op2: OutPt, op2b: OutPt, pt: IntPoint, discard_left: bool)bool
join_points(j: Join)Optional[tuple[OutPt, OutPt]]
poly2_contains_poly1(out_pt1: OutPt, out_pt2: OutPt)bool
fixup_first_lefts1(old_out_rec: OutRec, new_out_rec: OutRec)
fixup_first_lefts2(old_out_rec: OutRec, new_out_rec: OutRec)
join_common_edges()
update_out_pt_idxs(out_rec: OutRec)
do_simple_polygons()
area(poly: List[IntPoint])float
area_outrec(out_rec: OutRec)float
near_zero(val: float)bool
is_horizontal(e: TEdge)bool
point_is_vertex(pt: IntPoint, pp: OutPt)bool
point_on_line_segment(pt: IntPoint, line_pt1: IntPoint, line_pt2: IntPoint)bool
point_on_polygon(pt: IntPoint, pp: OutPt)bool
point_in_polygon(pt: IntPoint, pp: OutPt)bool
slopes_equal(e1: TEdge, e2: TEdge)bool
slopes_equal_pts(pt1: IntPoint, pt2: IntPoint, pt3: IntPoint)bool
slopes_equal_pts4(pt1: IntPoint, pt2: IntPoint, pt3: IntPoint, pt4: IntPoint)bool
range_test(pt: IntPoint)
init_edge(e: TEdge, e_next: TEdge, e_prev: TEdge, pt: IntPoint)
init_edge2(e: TEdge, poly_type: int)
add_path(pg: List[IntPoint], poly_type: int, closed: bool)bool
add_paths(ppg: List[List[IntPoint]], poly_type: int, closed: bool)bool
pt2_is_between_pt1_and_pt3(pt1: IntPoint, pt2: IntPoint, pt3: IntPoint)bool
remove_edge(e: TEdge)TEdge
get_last_horz(edge: TEdge)TEdge
shared_vert_with_prev_at_top(edge: TEdge)bool
shared_vert_with_next_is_bot(edge: TEdge)bool
more_below(edge: TEdge)bool
just_before_loc_min(edge: TEdge)bool
more_above(edge: TEdge)bool
all_horizontal(edge: TEdge)bool
set_dx(e: TEdge)Đặt giá trị dx.
do_minima_lml(e1: Optional[TEdge], e2: Optional[TEdge], is_closed: bool)
descend_to_min(e: TEdge)TEdge
ascend_to_max(e: TEdge, appending: bool, is_closed: bool)
add_bounds_to_lml(e: TEdge, closed: bool)TEdge
insert_local_minima(new_lm: LocalMinima)
pop_local_minima()
reverse_horizontal(e: TEdge)
get_bounds()IntRectTrở lại các giới hạn.

See Also

 Tiếng Việt