├── app ├── .gitignore ├── src │ ├── main │ │ ├── res │ │ │ ├── drawable │ │ │ │ ├── alipay.jpg │ │ │ │ ├── buymeacoffee.png │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── bg_chip_state_list.xml │ │ │ │ ├── ic_baseline_done_24px.xml │ │ │ │ ├── launcher_button_normal.xml │ │ │ │ ├── launcher_button_pressed.xml │ │ │ │ ├── ic_baseline_crop_24px.xml │ │ │ │ ├── ic_baseline_close_24px.xml │ │ │ │ ├── ic_baseline_photo_24px.xml │ │ │ │ ├── crop_button_selector.xml │ │ │ │ ├── ic_baseline_text_fields_24px.xml │ │ │ │ ├── launcher_button_selector.xml │ │ │ │ ├── ic_baseline_delete_forever_24px.xml │ │ │ │ ├── ic_baseline_help_24px.xml │ │ │ │ ├── ic_baseline_camera_alt_24px.xml │ │ │ │ ├── ic_baseline_rotate_right_24px.xml │ │ │ │ └── ic_baseline_settings_20px.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_launcher_round.png │ │ │ ├── values-zh │ │ │ │ ├── arrays.xml │ │ │ │ └── strings.xml │ │ │ ├── xml │ │ │ │ ├── file_paths.xml │ │ │ │ └── provider_paths.xml │ │ │ ├── values │ │ │ │ ├── arrays.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── styles.xml │ │ │ │ └── strings.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── menu │ │ │ │ ├── about_activity_menu.xml │ │ │ │ └── image_activity_menu.xml │ │ │ ├── layout │ │ │ │ ├── tag_chip_item.xml │ │ │ │ ├── activity_launcher.xml │ │ │ │ ├── dialog_add_note.xml │ │ │ │ ├── activity_settings.xml │ │ │ │ ├── activity_main.xml │ │ │ │ └── activity_about.xml │ │ │ └── drawable-v24 │ │ │ │ └── ic_launcher_foreground.xml │ │ ├── java │ │ │ └── com │ │ │ │ ├── mmjang │ │ │ │ └── ankillusion │ │ │ │ │ ├── utils │ │ │ │ │ ├── BuglyFileProvider.java │ │ │ │ │ └── Utils.java │ │ │ │ │ ├── data │ │ │ │ │ ├── OcclusionExportType.java │ │ │ │ │ ├── IOcclusionExporter.java │ │ │ │ │ ├── Constant.java │ │ │ │ │ ├── OperationResult.java │ │ │ │ │ ├── OcclusionObject.java │ │ │ │ │ └── OcclusionObjectListGenerator.java │ │ │ │ │ ├── MyApplication.java │ │ │ │ │ ├── anki │ │ │ │ │ └── OcclusionCardModel.java │ │ │ │ │ └── ui │ │ │ │ │ └── AboutActivity.java │ │ │ │ └── ichi2 │ │ │ │ └── anki │ │ │ │ └── api │ │ │ │ ├── BasicModel.java │ │ │ │ ├── Basic2Model.java │ │ │ │ └── NoteInfo.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── mmjang │ │ │ └── ankillusion │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── mmjang │ │ └── ankillusion │ │ └── ExampleInstrumentedTest.java ├── libs │ └── bugly_crashreport_upgrade-1.3.9.aar ├── proguard-rules.pro └── build.gradle ├── Doodle ├── app │ ├── .gitignore │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── values │ │ │ │ ├── colors.xml │ │ │ │ ├── dimens.xml │ │ │ │ └── strings.xml │ │ │ ├── drawable │ │ │ │ └── ic_launcher.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── thelittleprince2.png │ │ │ ├── values-en │ │ │ │ └── strings.xml │ │ │ └── layout │ │ │ │ ├── activity_scale_gesture_item.xml │ │ │ │ ├── activity_mosaic.xml │ │ │ │ ├── activity_guide.xml │ │ │ │ └── activity_main.xml │ │ │ ├── java │ │ │ └── cn │ │ │ │ └── hzw │ │ │ │ └── doodledemo │ │ │ │ ├── DemoApplication.java │ │ │ │ ├── guide │ │ │ │ ├── DoodleGuideActivity.java │ │ │ │ └── SimpleDoodleView.java │ │ │ │ ├── MosaicDemo.java │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ ├── proguard-rules.pro │ └── build.gradle ├── doodle │ ├── .gitignore │ ├── src │ │ └── main │ │ │ ├── res │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── doodle_btn_back.png │ │ │ │ ├── doodle_ic_arrow.png │ │ │ │ ├── doodle_ic_clear.png │ │ │ │ ├── doodle_ic_copy.png │ │ │ │ ├── doodle_ic_line.png │ │ │ │ ├── doodle_ic_move.png │ │ │ │ ├── doodle_ic_pen.png │ │ │ │ ├── doodle_ic_text.png │ │ │ │ ├── doodle_ic_undo.png │ │ │ │ ├── doodle_rotate.png │ │ │ │ ├── doodle_shader1.jpg │ │ │ │ ├── doodle_shader2.jpg │ │ │ │ ├── doodle_shader3.jpg │ │ │ │ ├── doodle_shader4.jpg │ │ │ │ ├── doodle_shader5.jpg │ │ │ │ ├── doodle_btn_finish.png │ │ │ │ ├── doodle_hide_panel.png │ │ │ │ ├── doodle_ic_eraser.png │ │ │ │ ├── doodle_ic_mosaic.png │ │ │ │ ├── doodle_ic_texture.png │ │ │ │ ├── doodle_ic_zoomer.png │ │ │ │ ├── doodle_ic_fill_rect.png │ │ │ │ ├── doodle_ic_handwrite.png │ │ │ │ ├── doodle_ic_undo_white.png │ │ │ │ ├── doodle_thumb_normal.png │ │ │ │ ├── doodle_thumb_pressed.png │ │ │ │ ├── doodle_bar_progress.9.png │ │ │ │ ├── doodle_ic_fill_circle.png │ │ │ │ ├── doodle_ic_hollow_rect.png │ │ │ │ ├── doodle_bar_background.9.png │ │ │ │ ├── doodle_hide_panel_pressed.png │ │ │ │ ├── doodle_ic_hollow_circle.png │ │ │ │ ├── doodle_imageselector_loading.9.png │ │ │ │ └── doodle_imageselector_image_selected.png │ │ │ ├── values │ │ │ │ ├── color.xml │ │ │ │ ├── dimen.xml │ │ │ │ └── strings.xml │ │ │ ├── drawable │ │ │ │ ├── doodle_shape_rect_pressed_black.xml │ │ │ │ ├── doodle_btn_effect_panel.xml │ │ │ │ ├── doodle_shape_rect_stroke_normal.xml │ │ │ │ ├── doodle_shape_circle_pressed.xml │ │ │ │ ├── doodle_btn_effect_rect_line.xml │ │ │ │ ├── doodle_shape_rect_stroke_pressed.xml │ │ │ │ ├── doodle_btn_effect_rect_pressed_black.xml │ │ │ │ ├── doodle_thumb_seekbarr.xml │ │ │ │ ├── doodle_shape_circle_normal.xml │ │ │ │ ├── doodle_seekbar_bg.xml │ │ │ │ └── doodle_btn_effect_round.xml │ │ │ ├── layout │ │ │ │ ├── doodle_create_bitmap.xml │ │ │ │ ├── doodle_imageselector_item.xml │ │ │ │ ├── doodle_create_text.xml │ │ │ │ ├── doodle_layout_image_selector.xml │ │ │ │ ├── doodle_title_bar.xml │ │ │ │ └── doodle_dialog.xml │ │ │ └── values-en │ │ │ │ └── strings.xml │ │ │ ├── java │ │ │ └── cn │ │ │ │ └── hzw │ │ │ │ └── doodle │ │ │ │ ├── core │ │ │ │ ├── IDoodleTouchDetector.java │ │ │ │ ├── IDoodleColor.java │ │ │ │ ├── IDoodleItemListener.java │ │ │ │ ├── IDoodlePen.java │ │ │ │ ├── IDoodleShape.java │ │ │ │ ├── IDoodleSelectableItem.java │ │ │ │ └── IDoodleItem.java │ │ │ │ ├── DoodleTouchDetector.java │ │ │ │ ├── IDoodleListener.java │ │ │ │ ├── DoodleShape.java │ │ │ │ ├── DoodlePaintAttrs.java │ │ │ │ ├── imagepicker │ │ │ │ ├── ImageLoader.java │ │ │ │ └── ImageSelectorAdapter.java │ │ │ │ ├── occlusion │ │ │ │ └── OcclusionItem.java │ │ │ │ ├── DoodleBitmap.java │ │ │ │ ├── DoodlePen.java │ │ │ │ ├── DoodleText.java │ │ │ │ ├── util │ │ │ │ └── TransformUtil.java │ │ │ │ ├── DoodleColor.java │ │ │ │ ├── CopyLocation.java │ │ │ │ └── DoodleParams.java │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ └── proguard-rules.pro ├── settings.gradle ├── changes.md ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradle.properties ├── build.gradle ├── .gitignore └── extend.md ├── etc ├── pic │ ├── mode_1.png │ ├── mode_2.png │ ├── mode_3.png │ ├── poster.psd │ ├── ankidoodle.gif │ ├── ankidroid.gif │ ├── google_play_big.png │ ├── google play icon.png │ ├── enframe_2019-04-24-19-51-45.png │ ├── enframe_2019-04-24-19-58-18.png │ ├── enframe_2019-04-24-19-58-27.png │ ├── enframe_2019-04-24-19-58-42.png │ └── enframe_2019-04-24-19-58-47.png └── icons │ ├── ic_launcher.png │ ├── ic_launcher - 副本.png │ ├── baseline-done-24px.svg │ ├── baseline-crop-24px.svg │ ├── baseline-close-24px.svg │ ├── baseline-photo-24px.svg │ ├── baseline-library_add-24px.svg │ ├── baseline-camera_alt-24px.svg │ ├── baseline-text_fields-24px.svg │ ├── baseline-delete_forever-24px.svg │ ├── baseline-help-24px.svg │ ├── baseline-rotate_right-24px.svg │ └── baseline-settings-20px.svg ├── frontend ├── heart.jpg ├── test_canvas.html └── test_canvas - 副本.html ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── settings.gradle ├── .gitignore ├── gradle.properties ├── documentation-cn.md ├── LICENSE.txt ├── documentation-en.md ├── README.md ├── gradlew.bat └── privacy_policy.md /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Doodle/app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Doodle/doodle/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /Doodle/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':doodle' 2 | -------------------------------------------------------------------------------- /etc/pic/mode_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/mode_1.png -------------------------------------------------------------------------------- /etc/pic/mode_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/mode_2.png -------------------------------------------------------------------------------- /etc/pic/mode_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/mode_3.png -------------------------------------------------------------------------------- /etc/pic/poster.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/poster.psd -------------------------------------------------------------------------------- /frontend/heart.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/frontend/heart.jpg -------------------------------------------------------------------------------- /etc/pic/ankidoodle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/ankidoodle.gif -------------------------------------------------------------------------------- /etc/pic/ankidroid.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/ankidroid.gif -------------------------------------------------------------------------------- /etc/icons/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/icons/ic_launcher.png -------------------------------------------------------------------------------- /etc/pic/google_play_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/google_play_big.png -------------------------------------------------------------------------------- /Doodle/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /etc/pic/google play icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/google play icon.png -------------------------------------------------------------------------------- /Doodle/changes.md: -------------------------------------------------------------------------------- 1 | ### V5.4 2 | 3 | * IDoodleItem支持缩放功能 4 | * 放大镜模式下增加全图预览的功能 5 | * 增加新的画笔:马赛克 6 | * 支持左旋转 7 | * 优化交互逻辑 -------------------------------------------------------------------------------- /etc/icons/ic_launcher - 副本.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/icons/ic_launcher - 副本.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/alipay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/drawable/alipay.jpg -------------------------------------------------------------------------------- /etc/pic/enframe_2019-04-24-19-51-45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/enframe_2019-04-24-19-51-45.png -------------------------------------------------------------------------------- /etc/pic/enframe_2019-04-24-19-58-18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/enframe_2019-04-24-19-58-18.png -------------------------------------------------------------------------------- /etc/pic/enframe_2019-04-24-19-58-27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/enframe_2019-04-24-19-58-27.png -------------------------------------------------------------------------------- /etc/pic/enframe_2019-04-24-19-58-42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/enframe_2019-04-24-19-58-42.png -------------------------------------------------------------------------------- /etc/pic/enframe_2019-04-24-19-58-47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/etc/pic/enframe_2019-04-24-19-58-47.png -------------------------------------------------------------------------------- /Doodle/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/buymeacoffee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/drawable/buymeacoffee.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/drawable/ic_launcher.png -------------------------------------------------------------------------------- /app/libs/bugly_crashreport_upgrade-1.3.9.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/libs/bugly_crashreport_upgrade-1.3.9.aar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /Doodle/gradle.properties: -------------------------------------------------------------------------------- 1 | MIN_SDK_VERSION=14 2 | TARGET_SDK_VERSION=22 3 | 4 | VERSION_NAME=5.5 5 | VERSION_CODE=54 6 | COMPILE_SDK_VERSION=27 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /Doodle/app/src/main/res/drawable/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/app/src/main/res/drawable/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /Doodle/app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':Doodle:doodle' 2 | include ":Doodle:app" 3 | //project(':libdoodle').projectDir = new File(settingsDir, '/Doodle/doodle/') 4 | include ':app' 5 | -------------------------------------------------------------------------------- /Doodle/app/src/main/res/drawable-xxhdpi/thelittleprince2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/app/src/main/res/drawable-xxhdpi/thelittleprince2.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_btn_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_btn_back.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_arrow.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_clear.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_copy.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_line.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_move.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_move.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_pen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_pen.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_text.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_undo.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_rotate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_rotate.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_shader1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_shader1.jpg -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_shader2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_shader2.jpg -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_shader3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_shader3.jpg -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_shader4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_shader4.jpg -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_shader5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_shader5.jpg -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_btn_finish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_btn_finish.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_hide_panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_hide_panel.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_eraser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_eraser.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_mosaic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_mosaic.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_texture.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_zoomer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_zoomer.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_fill_rect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_fill_rect.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_handwrite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_handwrite.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_undo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_undo_white.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_thumb_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_thumb_normal.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_thumb_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_thumb_pressed.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_bar_progress.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_bar_progress.9.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_fill_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_fill_circle.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_hollow_rect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_hollow_rect.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_bar_background.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_bar_background.9.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_hide_panel_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_hide_panel_pressed.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_hollow_circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_ic_hollow_circle.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_imageselector_loading.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_imageselector_loading.9.png -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_imageselector_image_selected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mmjang/Ankillusion/HEAD/Doodle/doodle/src/main/res/drawable-xxhdpi/doodle_imageselector_image_selected.png -------------------------------------------------------------------------------- /etc/icons/baseline-done-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/values/color.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ffffd943 4 | #88cccccc 5 | -------------------------------------------------------------------------------- /app/src/main/java/com/mmjang/ankillusion/utils/BuglyFileProvider.java: -------------------------------------------------------------------------------- 1 | package com.mmjang.ankillusion.utils; 2 | 3 | import android.support.v4.content.FileProvider; 4 | 5 | public class BuglyFileProvider extends FileProvider { 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/java/com/mmjang/ankillusion/data/OcclusionExportType.java: -------------------------------------------------------------------------------- 1 | package com.mmjang.ankillusion.data; 2 | 3 | public enum OcclusionExportType { 4 | HIDE_ALL_REVEAL_ALL, 5 | HIDE_ONE_REVEAL_ONE, 6 | HIDE_ALL_REVEAL_ONE 7 | } 8 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/java/cn/hzw/doodle/core/IDoodleTouchDetector.java: -------------------------------------------------------------------------------- 1 | package cn.hzw.doodle.core; 2 | 3 | import android.view.MotionEvent; 4 | 5 | public interface IDoodleTouchDetector { 6 | public boolean onTouchEvent(MotionEvent event); 7 | } 8 | -------------------------------------------------------------------------------- /app/src/main/res/values-zh/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 全遮全显 5 | 单遮单显 6 | 全遮单显 7 | 8 | -------------------------------------------------------------------------------- /etc/icons/baseline-crop-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/res/xml/file_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /app/src/main/java/com/mmjang/ankillusion/data/IOcclusionExporter.java: -------------------------------------------------------------------------------- 1 | package com.mmjang.ankillusion.data; 2 | 3 | import java.util.List; 4 | 5 | public interface IOcclusionExporter { 6 | OperationResult export(List occlusionObject); 7 | } 8 | -------------------------------------------------------------------------------- /Doodle/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 6 | -------------------------------------------------------------------------------- /etc/icons/baseline-close-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /etc/icons/baseline-photo-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Sun Apr 28 16:13:31 CST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip 7 | -------------------------------------------------------------------------------- /Doodle/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Jul 19 11:57:35 CST 2018 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hide All - Reveal All 5 | Hide One - Reveal One 6 | Hide All - Reveal One 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_chip_state_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /etc/icons/baseline-library_add-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable/doodle_shape_rect_pressed_black.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/values/dimen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 50dp 4 | 32dp 5 | 30dp 6 | 5dp 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable/doodle_btn_effect_panel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /etc/icons/baseline-camera_alt-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /etc/icons/baseline-text_fields-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/res/menu/about_activity_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_done_24px.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/launcher_button_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /etc/icons/baseline-delete_forever-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Doodle/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Doodle 3 | 马赛克 4 | 手势缩放 5 | 涂鸦入门 6 | 初级涂鸦 7 | 中级级涂鸦 8 | 高级级涂鸦 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/launcher_button_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /etc/icons/baseline-help-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_crop_24px.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_close_24px.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/xml/provider_paths.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Doodle/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | dependencies { 7 | classpath 'com.android.tools.build:gradle:3.4.0' 8 | } 9 | } 10 | 11 | allprojects { 12 | repositories { 13 | jcenter() 14 | maven { url 'https://jitpack.io' } 15 | google() 16 | } 17 | } 18 | 19 | task clean(type: Delete) { 20 | delete rootProject.buildDir 21 | } 22 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/java/cn/hzw/doodle/core/IDoodleColor.java: -------------------------------------------------------------------------------- 1 | package cn.hzw.doodle.core; 2 | 3 | import android.graphics.Paint; 4 | 5 | public interface IDoodleColor { 6 | 7 | /** 8 | * 配置画笔 9 | * @param doodleItem 10 | * @param paint 11 | */ 12 | public void config(IDoodleItem doodleItem, Paint paint); 13 | 14 | /** 15 | * 深度拷贝 16 | * @return 17 | */ 18 | public IDoodleColor copy(); 19 | } 20 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable/doodle_shape_rect_stroke_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable/doodle_shape_circle_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Doodle/app/src/main/res/values-en/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Doodle 3 | Mosaic 4 | Scale gesture 5 | Doodle Guide 6 | Simple doodle 7 | Middle doodle 8 | Advanced doodle 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_photo_24px.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable/doodle_btn_effect_rect_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable/doodle_shape_rect_stroke_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/crop_button_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #78909c 4 | #4b636e 5 | #a7c0cd 6 | #80a7c0cd 7 | #e65100 8 | #ac0800 9 | #ff7d47 10 | 11 | -------------------------------------------------------------------------------- /Doodle/.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle 2 | .gradle 3 | gradlew.bat 4 | build 5 | local.properties 6 | reports 7 | 8 | # Maven 9 | target 10 | pom.xml.* 11 | release.properties 12 | gen-external-apklibs 13 | 14 | # Eclipse 15 | .classpath 16 | .project 17 | .settings 18 | eclipsebin 19 | 20 | # IntelliJ IDEA 21 | .idea 22 | *.iml 23 | *.ipl 24 | *.iws 25 | classes/ 26 | idea-classes/ 27 | coverage-error.log 28 | 29 | # Android 30 | gen 31 | bin 32 | project.properties 33 | out 34 | 35 | # Finder 36 | .DS_Store -------------------------------------------------------------------------------- /Doodle/app/src/main/res/layout/activity_scale_gesture_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_text_fields_24px.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/test/java/com/mmjang/ankillusion/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.mmjang.ankillusion; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable/doodle_btn_effect_rect_pressed_black.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /etc/icons/baseline-rotate_right-24px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable/doodle_thumb_seekbarr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/launcher_button_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 9 | -------------------------------------------------------------------------------- /Doodle/app/src/main/java/cn/hzw/doodledemo/DemoApplication.java: -------------------------------------------------------------------------------- 1 | package cn.hzw.doodledemo; 2 | 3 | import android.app.Application; 4 | 5 | public class DemoApplication extends Application { 6 | @Override 7 | public void onCreate() { 8 | super.onCreate(); 9 | /* if (LeakCanary.isInAnalyzerProcess(this)) { 10 | // This process is dedicated to LeakCanary for heap analysis. 11 | // You should not init your app in this process. 12 | return; 13 | } 14 | LeakCanary.install(this);*/ 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/ichi2/anki/api/BasicModel.java: -------------------------------------------------------------------------------- 1 | package com.ichi2.anki.api; 2 | 3 | /** 4 | * Definitions of the basic model 5 | */ 6 | class BasicModel { 7 | public static final String[] FIELDS = {"Front","Back"}; 8 | // List of card names that will be used in AnkiDroid (one for each direction of learning) 9 | public static final String[] CARD_NAMES = {"Card 1"}; 10 | // Template for the question of each card 11 | static final String[] QFMT = {"{{Front}}"}; 12 | static final String[] AFMT = {"{{FrontSide}}\n\n
\n\n{{Back}}"}; 13 | } -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_delete_forever_24px.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/layout/tag_chip_item.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/java/cn/hzw/doodle/core/IDoodleItemListener.java: -------------------------------------------------------------------------------- 1 | package cn.hzw.doodle.core; 2 | 3 | /** 4 | * Created on 19/01/2019. 5 | */ 6 | public interface IDoodleItemListener { 7 | public int PROPERTY_SCALE = 1; 8 | public int PROPERTY_ROTATE = 2; 9 | public int PROPERTY_PIVOT_X = 3; 10 | public int PROPERTY_PIVOT_Y = 4; 11 | public int PROPERTY_SIZE = 5; 12 | public int PROPERTY_COLOR = 6; 13 | public int PROPERTY_LOCATION = 7; 14 | 15 | /** 16 | * 属性改变时回调 17 | * @param property 属性 18 | */ 19 | void onPropertyChanged(int property); 20 | } 21 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable/doodle_shape_circle_normal.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_help_24px.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_camera_alt_24px.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/ichi2/anki/api/Basic2Model.java: -------------------------------------------------------------------------------- 1 | package com.ichi2.anki.api; 2 | 3 | /** 4 | * Definitions of the basic with reverse model 5 | */ 6 | class Basic2Model { 7 | public static final String[] FIELDS = {"Front","Back"}; 8 | // List of card names that will be used in AnkiDroid (one for each direction of learning) 9 | public static final String[] CARD_NAMES = {"Card 1", "Card 2"}; 10 | // Template for the question of each card 11 | static final String[] QFMT = {"{{Front}}", "{{Back}}"}; 12 | static final String[] AFMT = {"{{FrontSide}}\n\n
\n\n{{Back}}", 13 | "{{FrontSide}}\n\n
\n\n{{Front}}"}; 14 | } -------------------------------------------------------------------------------- /Doodle/doodle/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion COMPILE_SDK_VERSION as int 5 | 6 | defaultConfig { 7 | minSdkVersion MIN_SDK_VERSION as int 8 | targetSdkVersion TARGET_SDK_VERSION as int 9 | versionCode VERSION_CODE as int 10 | versionName VERSION_NAME 11 | } 12 | buildTypes { 13 | release { 14 | minifyEnabled false 15 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 16 | } 17 | } 18 | } 19 | 20 | dependencies { 21 | // https://github.com/1993hzw/Androids 22 | api 'com.github.1993hzw:Androids:1.2.3' 23 | } -------------------------------------------------------------------------------- /app/src/main/res/menu/image_activity_menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/java/cn/hzw/doodle/core/IDoodlePen.java: -------------------------------------------------------------------------------- 1 | package cn.hzw.doodle.core; 2 | 3 | import android.graphics.Canvas; 4 | import android.graphics.Paint; 5 | 6 | public interface IDoodlePen { 7 | 8 | /** 9 | * 配置画笔 10 | * @param doodleItem 11 | * @param paint 12 | */ 13 | public void config(IDoodleItem doodleItem, Paint paint); 14 | 15 | /** 16 | * 深度拷贝 17 | * @return 18 | */ 19 | public IDoodlePen copy(); 20 | 21 | /** 22 | * 绘制画笔辅助工具,由IDoodle绘制,不属于IDoodleItem的内容 23 | * 比如可以用于仿制功能时 定位器的绘制 24 | * 25 | * @param canvas 26 | * @param doodle 27 | */ 28 | public void drawHelpers(Canvas canvas, IDoodle doodle); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable/doodle_seekbar_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 7 | 8 | 10 | 13 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 涂鸦 3 | 4 | 清屏 5 | 清屏后不可撤销 6 | 保存图片 7 | 确定 8 | 取消 9 | 10 | 编辑 11 | 移除 12 | 置顶 13 | 置底 14 | 15 | 选择图片 16 | 17 | 编辑模式 18 | 19 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/java/cn/hzw/doodle/core/IDoodleShape.java: -------------------------------------------------------------------------------- 1 | package cn.hzw.doodle.core; 2 | 3 | import android.graphics.Canvas; 4 | import android.graphics.Paint; 5 | 6 | /** 7 | * 图形 8 | */ 9 | public interface IDoodleShape { 10 | 11 | 12 | /** 13 | * 配置图形 14 | * @param doodleItem 15 | * @param paint 16 | */ 17 | public void config(IDoodleItem doodleItem, Paint paint); 18 | 19 | /** 20 | * 深度拷贝 21 | * @return 22 | */ 23 | public IDoodleShape copy(); 24 | 25 | /** 26 | * 绘制图形辅助工具,由IDoodle绘制,不属于IDoodleItem的内容 27 | * 28 | * @param canvas 29 | * @param doodle 30 | */ 31 | public void drawHelpers(Canvas canvas, IDoodle doodle); 32 | } 33 | -------------------------------------------------------------------------------- /Doodle/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/java/cn/hzw/doodle/core/IDoodleSelectableItem.java: -------------------------------------------------------------------------------- 1 | package cn.hzw.doodle.core; 2 | 3 | import android.graphics.Rect; 4 | 5 | /** 6 | * Created on 27/06/2018. 7 | */ 8 | 9 | public interface IDoodleSelectableItem extends IDoodleItem { 10 | 11 | /** 12 | * 设置是否选中 13 | * @param isSelected 14 | */ 15 | public void setSelected(boolean isSelected); 16 | 17 | /** 18 | * 是否选中 19 | * @return 20 | */ 21 | public boolean isSelected(); 22 | 23 | /** 24 | * item的矩形(缩放scale之后)范围 25 | * @return 26 | */ 27 | public Rect getBounds(); 28 | 29 | /** 30 | * 判断点(x,y)是否在item内,用于判断是否点中item 31 | */ 32 | public boolean contains(float x, float y); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_rotate_right_24px.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /Doodle/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/huangziwei/android-sdk-linux/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /Doodle/doodle/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/huangziwei/android-sdk-linux/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | *.db 4 | *.apk 5 | /local.properties 6 | /.idea/workspace.xml 7 | /.idea/libraries 8 | /app/release/ 9 | .DS_Store 10 | /build 11 | /captures 12 | /folioreader/build 13 | /Doodle/build 14 | .externalNativeBuild 15 | .idea 16 | 17 | # Custom 18 | _site 19 | 20 | # Ant 21 | MANIFEST.MF 22 | ./*.jar 23 | build.num 24 | build 25 | 26 | # ADT 27 | .classpath 28 | .project 29 | .settings 30 | local.properties 31 | bin 32 | gen 33 | _layouts 34 | proguard.cfg 35 | 36 | # OSX 37 | .DS_Store 38 | 39 | # Github 40 | gh-pages 41 | 42 | # Gradle 43 | .gradle 44 | build 45 | 46 | # IDEA 47 | *.iml 48 | *.ipr 49 | *.iws 50 | out 51 | .idea 52 | 53 | # Maven 54 | target 55 | release.properties 56 | pom.xml.* 57 | 58 | # Readium DRM LCP 59 | liblcp.aar -------------------------------------------------------------------------------- /Doodle/doodle/src/main/java/cn/hzw/doodle/DoodleTouchDetector.java: -------------------------------------------------------------------------------- 1 | package cn.hzw.doodle; 2 | 3 | import android.content.Context; 4 | 5 | import cn.forward.androids.TouchGestureDetector; 6 | import cn.hzw.doodle.core.IDoodleTouchDetector; 7 | 8 | public class DoodleTouchDetector extends TouchGestureDetector implements IDoodleTouchDetector { 9 | public DoodleTouchDetector(Context context, IOnTouchGestureListener listener) { 10 | super(context, listener); 11 | // 下面两行绘画场景下应该设置间距为大于等于1,否则设为0双指缩放后抬起其中一个手指仍然可以移动 12 | this.setScaleSpanSlop(1); // 手势前识别为缩放手势的双指滑动最小距离值 13 | this.setScaleMinSpan(1); // 缩放过程中识别为缩放手势的双指最小距离值 14 | 15 | this.setIsLongpressEnabled(false); 16 | this.setIsScrollAfterScaled(false); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/layout/doodle_create_bitmap.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 18 | -------------------------------------------------------------------------------- /etc/icons/baseline-settings-20px.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/values-en/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Doodle 3 | 4 | Clear 5 | Are you sure to clear all? 6 | Save before exit? 7 | Enter 8 | Cancel 9 | 10 | Edit 11 | Delete 12 | Top 13 | Bottom 14 | 15 | Select a image 16 | 17 | Edit mode 18 | 19 | -------------------------------------------------------------------------------- /app/src/main/java/com/mmjang/ankillusion/MyApplication.java: -------------------------------------------------------------------------------- 1 | package com.mmjang.ankillusion; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | 6 | import com.tencent.bugly.Bugly; 7 | import com.tencent.bugly.crashreport.CrashReport; 8 | 9 | public class MyApplication extends Application{ 10 | private static Context context; 11 | private static Application application; 12 | 13 | @Override 14 | public void onCreate() { 15 | super.onCreate(); 16 | context = getApplicationContext(); 17 | application = this; 18 | Bugly.init(getApplicationContext(), "77a9755f20", false); 19 | } 20 | 21 | public static Context getContext() { 22 | return context; 23 | } 24 | 25 | public static Application getApplication(){ 26 | return application; 27 | }} 28 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/mmjang/ankillusion/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.mmjang.ankillusion; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.mmjang.ankillusion", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx1536m 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | systemProp.http.proxyHost=127.0.0.1 15 | systemProp.http.proxyPort=1099 16 | systemProp.https.proxyHost=127.0.0.1 17 | systemProp.https.proxyPort=1099 -------------------------------------------------------------------------------- /Doodle/doodle/src/main/java/cn/hzw/doodle/IDoodleListener.java: -------------------------------------------------------------------------------- 1 | package cn.hzw.doodle; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import cn.hzw.doodle.core.IDoodle; 6 | 7 | /** 8 | * 涂鸦框架相关的回调 9 | * Created by huangziwei on 2017/3/17. 10 | */ 11 | 12 | public interface IDoodleListener { 13 | 14 | /** 15 | * called when save the doodled iamge. 保存涂鸦图像时调用 16 | * 17 | * @param doodle 18 | * @param doodleBitmap 涂鸦后的图片 19 | * @param callback called after saving the bitmap, if you continue to doodle. 保存后的回调,如果需要继续涂鸦,必须调用该回调 20 | */ 21 | void onSaved(IDoodle doodle, Bitmap doodleBitmap, Runnable callback); 22 | 23 | /** 24 | * called when it is ready to doodle because the view has been measured. Now, you can set size, color, pen, shape, etc. 25 | * 此时view已经测量完成,涂鸦前的准备工作已经完成,在这里可以设置大小、颜色、画笔、形状等。 26 | * @param doodle 27 | */ 28 | void onReady(IDoodle doodle); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 22 | 23 | -------------------------------------------------------------------------------- /documentation-cn.md: -------------------------------------------------------------------------------- 1 | # Anki 涂鸦制卡 2 | 3 | 4 | 5 | ## 简介 6 | 7 | “Anki 涂鸦制卡”([下载地址](https://www.coolapk.com/apk/com.mmjang.ankillusion))可快速地在图片上进行知识点遮挡并制作记忆卡片。 8 | 9 | 图片遮挡流程: 10 | 11 | ![](etc/pic/ankidoodle.gif) 12 | 13 | 卡片复习: 14 | 15 | ![](etc/pic/ankidroid.gif) 16 | 17 | “Anki 涂鸦制卡”需要配合记忆卡片软件 Ankidroid([下载地址](https://www.coolapk.com/apk/com.ichi2.anki 18 | ))使用。使用前需**确保**安装了 Ankidroid。 19 | 20 | ## 特性 21 | 22 | 图片可来自图库、相机、应用间分享; 23 | 24 | 可对图片进行翻转和裁剪这两种预处理流程; 25 | 26 | 遮挡矩形支持缩放、移动、旋转和删除操作; 27 | 28 | 支持3种制卡模式: 29 | 30 | 1. **全遮全显** 制作一张卡片,正面全部遮挡,反面全部显示; 31 | 32 | ![](etc/pic/mode_1.png) 33 | 34 | 2. **单遮单显** 根据遮挡矩形区域数量制作多张卡片,每张卡片依次遮挡各个矩形; 35 | 36 | ![](etc/pic/mode_2.png) 37 | 38 | 3. **全遮单显** 根据遮挡矩形区域数量制作多张卡片,每张卡片正面遮挡所有区域并依次高亮单个区域,背面仅显示高亮区域。 39 | 40 | ![](etc/pic/mode_3.png) 41 | 42 | ## 常见问题 43 | 44 | ### 为啥卡片中的图片无法同步到 PC 端? 45 | 46 | 由于 Ankidroid 的某些实现细节,它并不会检查通过接口添加的卡片里的媒体链接,这会导致图片无法进入媒体数据库 47 | 并且无法被同步。 48 | 49 | 为了解决这个问题, 在同步之前先点击 Ankidroid 右上角菜单的“检查媒体”选项。这会让通过涂鸦添加的图片可 50 | 同步到其他客户端。 -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright <2019> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the "Software") 5 | , to deal in the Software without restriction, including without 6 | limitation the rights to use, copy, modify, merge, publish, distribute, 7 | sublicense, and/or sell copies of the Software, and to permit persons 8 | to whom the Software is furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included 11 | in all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 14 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 16 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 17 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 18 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 19 | OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_baseline_settings_20px.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/layout/doodle_imageselector_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | 26 | -------------------------------------------------------------------------------- /app/src/main/java/com/mmjang/ankillusion/data/Constant.java: -------------------------------------------------------------------------------- 1 | package com.mmjang.ankillusion.data; 2 | 3 | import android.Manifest; 4 | import android.content.Context; 5 | import android.content.SharedPreferences; 6 | 7 | import com.mmjang.ankillusion.MyApplication; 8 | import com.mmjang.ankillusion.R; 9 | import com.mmjang.ankillusion.utils.Utils; 10 | 11 | public class Constant { 12 | public static final String DEFAULT_OCCLUSION_COLOR = "#0288d1";//"#fce77d"; 13 | public static final String DEFAULT_OCCLUSION_COLOR_HIGHLIGHT = Utils.color2Hex( 14 | MyApplication.getContext().getResources().getColor(R.color.colorAccent)); //"#f96167"; 15 | public static final String ANKI_PACKAGE_NAME = "com.ichi2.anki"; 16 | public static final String[] PERMISSION_FOR_EXPORT = new String[]{ 17 | Manifest.permission.WRITE_EXTERNAL_STORAGE, 18 | com.ichi2.anki.api.AddContentApi.READ_WRITE_PERMISSION 19 | }; 20 | public static final int MAX_IMAGE_WIDTH = 1080; 21 | public static final String OCCLUSION_MODEL_NAME = "ankillusion_note_type_v3"; 22 | public static final float ZOOMER_MULTIPLIER = 1.5f; 23 | } -------------------------------------------------------------------------------- /app/src/main/java/com/mmjang/ankillusion/data/OperationResult.java: -------------------------------------------------------------------------------- 1 | package com.mmjang.ankillusion.data; 2 | 3 | public class OperationResult { 4 | private boolean success; 5 | private String message; 6 | private Object result; 7 | 8 | public OperationResult(boolean success, String message) { 9 | this.success = success; 10 | this.message = message; 11 | } 12 | 13 | public OperationResult(boolean success, String message, Object result){ 14 | this.success = success; 15 | this.message = message; 16 | this.result = result; 17 | } 18 | 19 | public boolean isSuccess() { 20 | return success; 21 | } 22 | 23 | public void setSuccess(boolean success) { 24 | this.success = success; 25 | } 26 | 27 | public String getMessage() { 28 | return message; 29 | } 30 | 31 | public void setMessage(String message) { 32 | this.message = message; 33 | } 34 | 35 | public Object getResult() { 36 | return result; 37 | } 38 | 39 | public void setResult(Object result) { 40 | this.result = result; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/java/cn/hzw/doodle/DoodleShape.java: -------------------------------------------------------------------------------- 1 | package cn.hzw.doodle; 2 | 3 | import android.graphics.Canvas; 4 | import android.graphics.Paint; 5 | 6 | import cn.hzw.doodle.core.IDoodle; 7 | import cn.hzw.doodle.core.IDoodleItem; 8 | import cn.hzw.doodle.core.IDoodleShape; 9 | 10 | /** 11 | * 常用图形 12 | */ 13 | public enum DoodleShape implements IDoodleShape { 14 | HAND_WRITE, // 手绘 15 | ARROW, // 箭头 16 | LINE, // 直线 17 | FILL_CIRCLE, // 实心圆 18 | HOLLOW_CIRCLE, // 空心圆 19 | FILL_RECT, // 实心矩形 20 | HOLLOW_RECT; // 空心矩形 21 | 22 | 23 | @Override 24 | public void config(IDoodleItem doodleItem, Paint paint) { 25 | if (doodleItem.getShape() == DoodleShape.ARROW || doodleItem.getShape() == DoodleShape.FILL_CIRCLE || doodleItem.getShape() == DoodleShape.FILL_RECT) { 26 | paint.setStyle(Paint.Style.FILL); 27 | } else { 28 | paint.setStyle(Paint.Style.STROKE); 29 | } 30 | } 31 | 32 | @Override 33 | public IDoodleShape copy() { 34 | return this; 35 | } 36 | 37 | @Override 38 | public void drawHelpers(Canvas canvas, IDoodle doodle) { 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Doodle/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion COMPILE_SDK_VERSION as int 5 | 6 | defaultConfig { 7 | applicationId "cn.hzw.doodledemo" 8 | minSdkVersion MIN_SDK_VERSION as int 9 | targetSdkVersion TARGET_SDK_VERSION as int 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | implementation fileTree(include: ['*.jar'], dir: 'libs') 24 | implementation project(':Doodle:doodle') 25 | implementation ('cn.hzw.imageselector:library:1.0'){ 26 | transitive = false 27 | } 28 | 29 | /* // test 30 | debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2' 31 | releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2' 32 | // Optional, if you use support library fragments: 33 | debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:1.6.2'*/ 34 | } 35 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/res/drawable/doodle_btn_effect_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Doodle/doodle/src/main/java/cn/hzw/doodle/DoodlePaintAttrs.java: -------------------------------------------------------------------------------- 1 | package cn.hzw.doodle; 2 | 3 | import cn.hzw.doodle.core.IDoodleColor; 4 | import cn.hzw.doodle.core.IDoodlePen; 5 | import cn.hzw.doodle.core.IDoodleShape; 6 | 7 | /** 8 | * 画笔属性 9 | * Created on 29/06/2018. 10 | */ 11 | 12 | public class DoodlePaintAttrs { 13 | private IDoodlePen mPen; // 画笔类型 14 | private IDoodleShape mShape; // 画笔形状 15 | private float mSize; // 大小 16 | private IDoodleColor mColor; // 颜色 17 | 18 | public IDoodlePen pen() { 19 | return mPen; 20 | } 21 | 22 | public DoodlePaintAttrs pen(IDoodlePen pen) { 23 | mPen = pen; 24 | return this; 25 | } 26 | 27 | public IDoodleShape shape() { 28 | return mShape; 29 | } 30 | 31 | public DoodlePaintAttrs shape(IDoodleShape shape) { 32 | mShape = shape; 33 | return this; 34 | } 35 | 36 | public float size() { 37 | return mSize; 38 | } 39 | 40 | public DoodlePaintAttrs size(float size) { 41 | mSize = size; 42 | return this; 43 | } 44 | 45 | public IDoodleColor color() { 46 | return mColor; 47 | } 48 | 49 | public DoodlePaintAttrs color(IDoodleColor color) { 50 | mColor = color; 51 | return this; 52 | } 53 | 54 | public static DoodlePaintAttrs create() { 55 | return new DoodlePaintAttrs(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /Doodle/extend.md: -------------------------------------------------------------------------------- 1 | Extended code 拓展代码 2 | ================ 3 | 4 | ``` 5 | /** 6 | * Make the picture fill the display 7 | * 使图片填充屏幕 8 | */ 9 | public void centerCrop() { 10 | RectF rectF = mDoodleView.getDoodleBound(); 11 | float scaleW = mDoodleView.getWidth() / rectF.width(); 12 | float scaleH = mDoodleView.getHeight() / rectF.height(); 13 | float scale = Math.max(scaleW, scaleH); 14 | mDoodleView.setDoodleScale(scale, mDoodleView.toX(mDoodleView.getWidth() / 2), mDoodleView.toY(mDoodleView.getHeight() / 2)); 15 | } 16 | ``` 17 | 18 | ``` 19 | /** 20 | * Text item that does not follow the zoom 21 | * 不跟随缩放变化的文字item 22 | */ 23 | public class FixedSizeDoodleText extends DoodleText { 24 | 25 | float mScaleBefore; 26 | 27 | public FixedSizeDoodleText(IDoodle doodle, String text, float size, IDoodleColor color, float x, float y) { 28 | super(doodle, text, size, color, x, y); 29 | } 30 | @Override 31 | public void setSize(float size) { 32 | super.setSize(size); 33 | if (getDoodle() != null) { // Record multiples before scaling. 记录缩放前的倍数 34 | mScaleBefore = getDoodle().getDoodleScale(); 35 | } 36 | } 37 | 38 | @Override 39 | public void doDraw(Canvas canvas) { 40 | float scaleAfter = getDoodle().getDoodleScale(); 41 | setSize(mScaleBefore / scaleAfter * getSize()); // Resize after scaling. 缩放后重新设置大小 42 | super.doDraw(canvas); 43 | } 44 | } 45 | ``` -------------------------------------------------------------------------------- /app/src/main/java/com/mmjang/ankillusion/utils/Utils.java: -------------------------------------------------------------------------------- 1 | package com.mmjang.ankillusion.utils; 2 | 3 | import android.content.Context; 4 | import android.content.DialogInterface; 5 | import android.content.pm.PackageManager; 6 | import android.support.v4.app.ActivityCompat; 7 | import android.support.v7.app.AlertDialog; 8 | 9 | public class Utils { 10 | public static boolean hasPermissions(Context context, String... permissions) { 11 | if (context != null && permissions != null) { 12 | for (String permission : permissions) { 13 | if (ActivityCompat.checkSelfPermission(context, permission) != PackageManager.PERMISSION_GRANTED) { 14 | return false; 15 | } 16 | } 17 | } 18 | return true; 19 | } 20 | 21 | public static void showMessage(Context context, String message){ 22 | new AlertDialog.Builder(context) 23 | .setMessage(message) 24 | .setIcon(android.R.drawable.ic_dialog_alert) 25 | .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { 26 | public void onClick(DialogInterface dialog, int whichButton) { 27 | return; 28 | } 29 | }).show(); 30 | } 31 | 32 | public static String color2Hex(int color){ 33 | String strColor = String.format("#%06X", 0xFFFFFF & color); 34 | return strColor; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 28 5 | defaultConfig { 6 | applicationId "com.mmjang.ankillusion" 7 | minSdkVersion 21 8 | targetSdkVersion 28 9 | versionCode 14 10 | versionName "1.4.0" 11 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | implementation fileTree(dir: 'libs', include: ['*.jar']) 23 | //noinspection GradleCompatible 24 | implementation 'com.android.support:appcompat-v7:28.0.0' 25 | implementation 'com.android.support:design:28.0.0' 26 | implementation 'com.android.support.constraint:constraint-layout:1.0.2' 27 | implementation 'com.github.duanhong169:colorpicker:1.1.6' 28 | api 'com.theartofdev.edmodo:android-image-cropper:2.7.0' 29 | //implementation 'com.tencent.bugly:crashreport:latest.release' //其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.2.0 30 | implementation(name: 'bugly_crashreport_upgrade-1.3.9', ext: 'aar') 31 | //implementation 'com.github.1993hzw:Doodle:5.5' 32 | implementation project(':Doodle:doodle') 33 | testImplementation 'junit:junit:4.12' 34 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 35 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 36 | } 37 | -------------------------------------------------------------------------------- /Doodle/app/src/main/res/layout/activity_mosaic.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 11 | 12 | 18 | 19 |