@@ -52,54 +52,6 @@ void surface::mark_dirty(const bounding_box& rect) {
5252 cairo_surface_mark_dirty_rectangle (_Surface.get (), _Double_to_int (rect.x ()), _Double_to_int (rect.y ()), _Double_to_int (rect.width ()), _Double_to_int (rect.height ()));
5353}
5454
55- void surface::map (const ::std::function<void (mapped_surface&)>& action) {
56- if (action != nullptr ) {
57- mapped_surface m ({ cairo_surface_map_to_image (_Surface.get (), nullptr ), nullptr }, { _Surface.get (), nullptr });
58- action (m);
59- mark_dirty ();
60- }
61- }
62-
63- void surface::map (const ::std::function<void (mapped_surface&, error_code&)>& action, error_code& ec) {
64- if (action != nullptr ) {
65- mapped_surface m ({ cairo_surface_map_to_image (_Surface.get (), nullptr ), nullptr }, { _Surface.get (), nullptr }, ec);
66- if (static_cast <bool >(ec)) {
67- return ;
68- }
69- action (m, ec);
70- if (static_cast <bool >(ec)) {
71- return ;
72- }
73- mark_dirty ();
74- }
75- ec.clear ();
76- }
77-
78- void surface::map (const ::std::function<void (mapped_surface&)>& action, const bounding_box& extents) {
79- if (action != nullptr ) {
80- cairo_rectangle_int_t cextents{ _Double_to_int (extents.x ()), _Double_to_int (extents.y ()), _Double_to_int (extents.width ()), _Double_to_int (extents.height ()) };
81- mapped_surface m ({ cairo_surface_map_to_image (_Surface.get (), &cextents), nullptr }, { _Surface.get (), nullptr });
82- action (m);
83- }
84- mark_dirty (extents);
85- }
86-
87- void surface::map (const ::std::function<void (mapped_surface&, error_code&)>& action, const bounding_box& extents, error_code& ec) {
88- if (action != nullptr ) {
89- cairo_rectangle_int_t cextents{ _Double_to_int (extents.x ()), _Double_to_int (extents.y ()), _Double_to_int (extents.width ()), _Double_to_int (extents.height ()) };
90- mapped_surface m ({ cairo_surface_map_to_image (_Surface.get (), &cextents), nullptr }, { _Surface.get (), nullptr }, ec);
91- if (static_cast <bool >(ec)) {
92- return ;
93- }
94- action (m, ec);
95- if (static_cast <bool >(ec)) {
96- return ;
97- }
98- mark_dirty (extents);
99- }
100- ec.clear ();
101- }
102-
10355void surface::clear () {
10456 cairo_save (_Context.get ());
10557 cairo_set_operator (_Context.get (), CAIRO_OPERATOR_CLEAR);
@@ -246,7 +198,7 @@ void surface::stroke(const brush& b, const interpreted_path& pg, const optional<
246198 cairo_stroke (context);
247199}
248200
249- void surface::mask (const brush& b, const brush& mb, const interpreted_path& pg, const optional<brush_props>& bp, const optional<mask_props>& mp, const optional<render_props>& rp, const optional<clip_props>& cl) {
201+ /* void surface::mask(const brush& b, const brush& mb, const interpreted_path& pg, const optional<brush_props>& bp, const optional<mask_props>& mp, const optional<render_props>& rp, const optional<clip_props>& cl) {
250202 auto context = _Context.get();
251203 _Set_render_props(context, rp);
252204 _Set_clip_props(context, cl);
@@ -256,4 +208,4 @@ void surface::mask(const brush& b, const brush& mb, const interpreted_path& pg,
256208 cairo_new_path(context);
257209 cairo_append_path(context, pg._Native_handle());
258210 cairo_mask(context, mb.native_handle());
259- }
211+ }*/
0 commit comments