@@ -703,8 +703,6 @@ void image_surface::save(string f, image_file_format idf) {
703703 }
704704}
705705
706- // make friendship decision
707- /*
708706void image_surface::map (const ::std::function<void (mapped_surface&)>& action) {
709707 if (action != nullptr ) {
710708 mapped_surface m ({ cairo_surface_map_to_image (_Surface.get (), nullptr ), nullptr }, { _Surface.get (), nullptr });
@@ -727,35 +725,7 @@ void image_surface::map(const ::std::function<void(mapped_surface&, error_code&)
727725 }
728726 ec.clear ();
729727}
730- */
731728
732- // divergent from paper
733- /*
734- void image_surface::map(const ::std::function<void(mapped_surface&)>& action, const bounding_box& extents) {
735- if (action != nullptr) {
736- 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()) };
737- mapped_surface m({ cairo_surface_map_to_image(_Surface.get(), &cextents), nullptr }, { _Surface.get(), nullptr });
738- action(m);
739- }
740- mark_dirty(extents);
741- }
742-
743- void image_surface::map(const ::std::function<void(mapped_surface&, error_code&)>& action, const bounding_box& extents, error_code& ec) {
744- if (action != nullptr) {
745- 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()) };
746- mapped_surface m({ cairo_surface_map_to_image(_Surface.get(), &cextents), nullptr }, { _Surface.get(), nullptr }, ec);
747- if (static_cast<bool>(ec)) {
748- return;
749- }
750- action(m, ec);
751- if (static_cast<bool>(ec)) {
752- return;
753- }
754- mark_dirty(extents);
755- }
756- ec.clear();
757- }
758- */
759729format image_surface::format () const noexcept {
760730 return _Cairo_format_t_to_format (cairo_image_surface_get_format (_Surface.get ()));
761731}
0 commit comments