diff options
author | marinofaggiana <marino@marinofaggiana.com> | 2019-09-06 18:26:02 +0300 |
---|---|---|
committer | marinofaggiana <marino@marinofaggiana.com> | 2019-09-06 18:26:02 +0300 |
commit | eb9d976daf9a6385beb372f0795b2f903683c880 (patch) | |
tree | 6f4eb15606b57a248040ff411341dc16a8669cb4 /Libraries external | |
parent | faee8644623782e8b981fe65455dfb25a966ad2d (diff) |
clear code
Diffstat (limited to 'Libraries external')
19 files changed, 0 insertions, 864 deletions
diff --git a/Libraries external/Imagemeter/Resources/FreeSans.ttf b/Libraries external/Imagemeter/Resources/FreeSans.ttf Binary files differdeleted file mode 100644 index 5d17b322c..000000000 --- a/Libraries external/Imagemeter/Resources/FreeSans.ttf +++ /dev/null diff --git a/Libraries external/Imagemeter/Resources/Objektbeschreibung.imi b/Libraries external/Imagemeter/Resources/Objektbeschreibung.imi Binary files differdeleted file mode 100644 index 6af8d29f4..000000000 --- a/Libraries external/Imagemeter/Resources/Objektbeschreibung.imi +++ /dev/null diff --git a/Libraries external/Imagemeter/include/IMEditCore.h b/Libraries external/Imagemeter/include/IMEditCore.h deleted file mode 100644 index 7a410aad3..000000000 --- a/Libraries external/Imagemeter/include/IMEditCore.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2018-2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -#ifndef IMAGEMETER_IMEDITCORE_H -#define IMAGEMETER_IMEDITCORE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdint.h> -#include <stdbool.h> - - -struct IM_EditCore; - -void IM_EditCore_release(struct IM_EditCore*); - - -void IM_EditCore_touchDown(struct IM_EditCore*, int id, int x,int y, double timestamp_secs); - -void IM_EditCore_touchMove(struct IM_EditCore*, int id, int x,int y, double timestamp_secs); - -void IM_EditCore_touchUp(struct IM_EditCore*, int id, int x,int y, double timestamp_secs); - -void IM_EditCore_touchCancelled(struct IM_EditCore*, int id); - - -void IM_EditCore_start_interaction_addMeasure(struct IM_EditCore*, const char* preset); - -void IM_EditCore_start_interaction_addAngle(struct IM_EditCore*); - -void IM_EditCore_start_interaction_addText(struct IM_EditCore*); - -void IM_EditCore_start_interaction_addFreehand(struct IM_EditCore*); - -void IM_EditCore_end_current_interaction(struct IM_EditCore*); - - -void IM_EditCore_set_color_of_active_element(struct IM_EditCore*,uint32_t argb); - -void IM_EditCore_set_color_of_future_created_elements(struct IM_EditCore*,uint32_t argb); - -void IM_EditCore_delete_active_element(struct IM_EditCore*); - -void IM_EditCore_undo(struct IM_EditCore*); - -void IM_EditCore_redo(struct IM_EditCore*); - -bool IM_EditCore_undo_available(struct IM_EditCore*); - -bool IM_EditCore_redo_available(struct IM_EditCore*); - - -void IM_EditCore_audioCompleted(struct IM_EditCore*, const char* audioFile); - -#ifdef __cplusplus -} -#endif - -#endif //IMAGEMETER_IMEDITCORE_H diff --git a/Libraries external/Imagemeter/include/IMEditCoreContext.h b/Libraries external/Imagemeter/include/IMEditCoreContext.h deleted file mode 100644 index 377ba4d88..000000000 --- a/Libraries external/Imagemeter/include/IMEditCoreContext.h +++ /dev/null @@ -1,134 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2018-2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -#ifndef IMAGEMETER_IMEDITCORECONTEXT_H -#define IMAGEMETER_IMEDITCORECONTEXT_H - -#include "IMError.h" -#include "IMEditCore.h" - -#include <stdbool.h> - -#ifdef __cplusplus -extern "C" { -#endif - -struct IM_EditCoreContext; - - -// from Geometry.h -enum IM_ImageFitMode -{ - IM_ImageFitMode_Fit = 0, // fit image into screen to be completely visible - IM_ImageFitMode_Fill = 1, // fill screen completely (extending beyond borders) - IM_ImageFitMode_GeometricMean = 2 // compromise between Fit and Fill (neither too small, nor too big) -}; - - -// If nRenderingThreads==0, rendering has to be carried out manually -struct IM_EditCoreContext* IM_EditCoreContext_alloc(bool interactive, - int nRenderingThreads); - -void IM_EditCoreContext_release(struct IM_EditCoreContext*); - -void IM_EditCoreContext_add_font(struct IM_EditCoreContext*, const char* fontFile); - -//void add_font(const std::vector<uint8_t>& fontData); - -void IM_EditCoreContext_set_EditCoreUIControl(struct IM_EditCoreContext*, struct IM_EditCoreUIControl*); - -//struct IM_Result* load_from_bundle(const std::shared_ptr<DataBundleCPP>& bundle); - -struct IM_Error* IM_EditCoreContext_load_from_bundle_directory(struct IM_EditCoreContext*, - const char* bundleDirectory); - -//IMResult<void> load_from_imm_file(Path bundleDirectory, -// const std::shared_ptr<IMMFile>& imm); - - -enum IM_IMMLoadingState -{ - IM_IMMLoadingState_NotLoaded = 0, - IM_IMMLoadingState_LoadingError = 1, - IM_IMMLoadingState_LoadedIncompletely = 2, // some GElements could not be loaded. Ok for read-only, but do not overwrite. - IM_IMMLoadingState_Loaded = 3 -}; - -enum IM_IMMLoadingState IM_EditCoreContext_get_imm_loading_state(struct IM_EditCoreContext*); - -bool IM_EditCoreContext_ready_to_initialize_openGL(struct IM_EditCoreContext*); - - -// returns true if the IMM has changed -//bool prepare_imm_for_saving(); - -//IMResult<void> restore_imm_to_stored_state(); - -// result.throws<IMError_DataBundle_CannotWriteIMM>(); -//IMResult<void> save_to_bundle_directory(); - -// TODO: set a state whether loading the IMM failed / failed a bit / succeeded - - - -// --- access to objects managed by the context - -//std::shared_ptr<IMMFile> get_IMM_file(); - -struct IM_EditCore* IM_EditCoreContext_get_EditCore(struct IM_EditCoreContext*); - -//std::shared_ptr<GLBackgroundImage> get_BackgroundImage() { return mBkgImage; } - -//std::shared_ptr<EditCoreGraphics_OpenGLES2> get_EditCoreGraphics() - -//std::shared_ptr<DataBundleCPP> get_data_bundle() { return mDataBundle; } - - -// --- drawing - -// These functions (except render()) have to be called on the OpenGL thread - -struct IM_Error* IM_EditCoreContext_load_auxiliary_files(struct IM_EditCoreContext*); - -struct IM_Error* IM_EditCoreContext_init_OpenGL_resources(struct IM_EditCoreContext*); - -void IM_EditCoreContext_set_OpenGL_viewport(struct IM_EditCoreContext*, - int viewport_width, - int viewport_height, - float density_dpi); - -void IM_EditCoreContext_set_displayTransform(struct IM_EditCoreContext*, - enum IM_ImageFitMode mode, bool flipV); - -//void set_displayTransform(AffineTransform transform); - -//bool is_display_transform_set() const { return mDisplayTransformSet; } - -void IM_EditCoreContext_free_OpenGL_resources(struct IM_EditCoreContext*); - -// Manually render the scene before drawing. Only needed when there are no rendering threads. -//void render(); - -//void wait_until_rendering_is_finished(); - -void IM_EditCoreContext_draw_to_OpenGL(struct IM_EditCoreContext*); - - -#ifdef __cplusplus -} -#endif - - -#endif //IMAGEMETER_IMEDITCORECONTEXT_H diff --git a/Libraries external/Imagemeter/include/IMEditCoreUIControl.h b/Libraries external/Imagemeter/include/IMEditCoreUIControl.h deleted file mode 100644 index 697308b38..000000000 --- a/Libraries external/Imagemeter/include/IMEditCoreUIControl.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2018-2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -#ifndef IMAGEMETER_IMEDITCOREUICONTROL_H -#define IMAGEMETER_IMEDITCOREUICONTROL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdbool.h> - -struct IM_EditCoreUIControl; -struct IM_GElement; - - -// You may set unused callback functions to NULL. -// -struct IM_EditCoreUIControl_Callbacks -{ - // iOS see: https://stackoverflow.com/questions/7747742/on-demand-opengl-es-rendering-using-glkit - void (*needsRedraw)(); - - void (*scheduleTouchTimerEvent)(double delay_secs); - - void (*addingGElementFinished)(bool success); - - - void (*activateGElement)(const struct IM_GElement* element); - - void (*deactivateGElement)(); - - void (*updateDeleteButtonState)(); - - void (*updateUndoUIButtonStates)(); - - - - // --- element value entry - - void (*editTextBox)(int elementID); - - - // --- playing audio --- - - bool (*supportsAudioPlayback)(); - - bool (*playAudio)(const char* filename); - - void (*stopAudio)(const char* filename); -}; - - -void IM_EditCoreUIControl_Callbacks_clear(struct IM_EditCoreUIControl_Callbacks*); - - -struct IM_EditCoreUIControl* IM_EditCoreUIControl_alloc(const struct IM_EditCoreUIControl_Callbacks*); - -void IM_EditCoreUIControl_release(struct IM_EditCoreUIControl*); - -#ifdef __cplusplus -} -#endif - -#endif //IMAGEMETER_IMEDITCORE_H diff --git a/Libraries external/Imagemeter/include/IMError.h b/Libraries external/Imagemeter/include/IMError.h deleted file mode 100644 index 7473e539c..000000000 --- a/Libraries external/Imagemeter/include/IMError.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2018-2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -#ifndef IMAGEMETER_IMERROR_H -#define IMAGEMETER_IMERROR_H - -#ifdef __cplusplus -extern "C" { -#endif - -struct IM_Error; - -void IM_Error_release(struct IM_Error*); - -#ifdef __cplusplus -} -#endif - -#endif //IMAGEMETER_IMERROR_H diff --git a/Libraries external/Imagemeter/include/IMGElement.h b/Libraries external/Imagemeter/include/IMGElement.h deleted file mode 100644 index 32e0182e6..000000000 --- a/Libraries external/Imagemeter/include/IMGElement.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -#ifndef IMAGEMETER_IMGELEMENT_H -#define IMAGEMETER_IMGELEMENT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdint.h> -#include <stdbool.h> - - -struct IM_GElement; - -void IM_GElement_release(struct IM_GElement*); - -void IM_GElement_set_main_color_argb(struct IM_GElement*, uint32_t argb); - -uint32_t IM_GElement_get_main_color_argb(struct IM_GElement*); - -void IM_GElement_set_main_line_width(struct IM_GElement*, float width); - -float IM_GElement_get_main_line_width(struct IM_GElement*); - -void IM_GElement_set_main_line_width_magnification(struct IM_GElement*, float magnification); - -float IM_GElement_get_main_line_width_magnification(struct IM_GElement*); - -void IM_GElement_set_main_font_base_size(struct IM_GElement*, float fontSize); - -float IM_GElement_get_main_font_base_size(struct IM_GElement*); - -void IM_GElement_set_main_font_base_size_magnification(struct IM_GElement*, float magnification); - -float IM_GElement_get_main_font_base_size_magnification(struct IM_GElement*); - - -struct IM_Label* IM_GElement_get_label(struct IM_GElement*, int id); - - -#ifdef __cplusplus -} -#endif - -#endif //IMAGEMETER_IMGELEMENT_H diff --git a/Libraries external/Imagemeter/include/IMGText.h b/Libraries external/Imagemeter/include/IMGText.h deleted file mode 100644 index 3e0057371..000000000 --- a/Libraries external/Imagemeter/include/IMGText.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -#ifndef IMAGEMETER_IMGTEXT_H -#define IMAGEMETER_IMGTEXT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdint.h> -#include <stdbool.h> - - -struct IM_GText; - -bool IM_GElement_is_GText(struct IM_GElement*); - -struct IM_GText* IM_GText_from_GElement(struct IM_GElement*); - -void IM_GText_release(struct IM_GText*); - -void IM_GText_set_text(struct IM_GText*, const char* text); - -const char* IM_GText_get_text(const struct IM_GText*); - -void IM_GText_set_text_color_argb(struct IM_GText*, uint32_t argb); - -uint32_t IM_GText_get_text_color_argb(const struct IM_GText*); - -void IM_GText_set_show_border(struct IM_GText*, bool enable); - -bool IM_GText_get_show_border(const struct IM_GText*); - -void IM_GText_set_show_arrows(struct IM_GText*, bool enable); - -bool IM_GText_get_show_arrows(const struct IM_GText*); - -void IM_GText_set_fill_background(struct IM_GText*, bool enable); - -bool IM_GText_get_fill_background(const struct IM_GText*); - - -void IM_GText_add_arrow(struct IM_GText*); - -bool IM_GText_delete_arrow(const struct IM_GText*); - - -void IM_GText_set_audio_recording(struct IM_GText*, const char* filename, int duration_msecs); - -void IM_GText_delete_audio_recording(struct IM_GText*); - -const char* IM_GText_get_audio_recording_filename(const struct IM_GText*); - -int IM_GText_get_audio_recording_duration_msecs(const struct IM_GText*); - - -#ifdef __cplusplus -} -#endif - -#endif //IMAGEMETER_IMGTEXT_H diff --git a/Libraries external/Imagemeter/include/IMLabel.h b/Libraries external/Imagemeter/include/IMLabel.h deleted file mode 100644 index b77219c99..000000000 --- a/Libraries external/Imagemeter/include/IMLabel.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -#ifndef IMAGEMETER_IMLABEL_H -#define IMAGEMETER_IMLABEL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdint.h> -#include <stdbool.h> - - -struct IM_Label; - - -void IM_Label_release(struct IM_Label*); - -// returns 'true' when this is a value dimension value -bool IM_Label_set_value_from_string(struct IM_Label*, const char* value_string); - -const char* IM_Label_get_value_as_string(const struct IM_Label*); - - -#ifdef __cplusplus -} -#endif - -#endif //IMAGEMETER_IMLABEL_H diff --git a/Libraries external/Imagemeter/libs/libeditcore-c-api.a b/Libraries external/Imagemeter/libs/libeditcore-c-api.a Binary files differdeleted file mode 100644 index 6dbf06c88..000000000 --- a/Libraries external/Imagemeter/libs/libeditcore-c-api.a +++ /dev/null diff --git a/Libraries external/Imagemeter/libs/libfreetype.a b/Libraries external/Imagemeter/libs/libfreetype.a Binary files differdeleted file mode 100644 index 4c40fb861..000000000 --- a/Libraries external/Imagemeter/libs/libfreetype.a +++ /dev/null diff --git a/Libraries external/Imagemeter/libs/libturbojpeg.a b/Libraries external/Imagemeter/libs/libturbojpeg.a Binary files differdeleted file mode 100644 index 769f62cea..000000000 --- a/Libraries external/Imagemeter/libs/libturbojpeg.a +++ /dev/null diff --git a/Libraries external/Imagemeter/swift/EditCore.swift b/Libraries external/Imagemeter/swift/EditCore.swift deleted file mode 100644 index 98fdabfd1..000000000 --- a/Libraries external/Imagemeter/swift/EditCore.swift +++ /dev/null @@ -1,100 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -import Foundation - -public class EditCore { - - var editcore : OpaquePointer; - - init (ptr : OpaquePointer) { - editcore = ptr - } - - deinit { - IM_EditCore_release(editcore) - } - - - func touchDown(id : Int32, x : Int32, y : Int32, timestamp_secs : Double) { - IM_EditCore_touchDown(editcore, id, x,y, timestamp_secs) - } - - func touchMove(id : Int32, x : Int32, y : Int32, timestamp_secs : Double) { - IM_EditCore_touchMove(editcore, id, x,y, timestamp_secs) - } - - func touchUp(id : Int32, x : Int32, y : Int32, timestamp_secs : Double) { - IM_EditCore_touchUp(editcore, id, x,y, timestamp_secs) - } - - func touchCancelled(id : Int32) { - IM_EditCore_touchCancelled(editcore, id) - } - - func start_interaction_addMeasure() { - IM_EditCore_start_interaction_addMeasure(editcore, "") - } - - // TODO: not fully working yet, because we need timer callbacks because of the double-click interactions - func start_interaction_addAngle() { - IM_EditCore_start_interaction_addAngle(editcore) - } - - func start_interaction_addText() { - IM_EditCore_start_interaction_addText(editcore) - } - - func start_interaction_addFreehand() { - IM_EditCore_start_interaction_addFreehand(editcore) - } - - func end_current_interaction() { - IM_EditCore_end_current_interaction(editcore) - } - - func set_color_of_active_element(argb : UInt32) { - IM_EditCore_set_color_of_active_element(editcore,argb) - } - - func set_color_of_future_created_elements(argb : UInt32) { - IM_EditCore_set_color_of_future_created_elements(editcore, argb) - } - - func delete_active_element() { - IM_EditCore_delete_active_element(editcore) - } - - func undo() { - IM_EditCore_undo(editcore) - } - - func redo() { - IM_EditCore_redo(editcore) - } - - func undo_available() -> Bool { - return IM_EditCore_undo_available(editcore) - } - - func redo_available() -> Bool { - return IM_EditCore_redo_available(editcore) - } - - func audio_completed(audioFile : String) { - IM_EditCore_audioCompleted(editcore, UnsafePointer(audioFile)) - } -} - diff --git a/Libraries external/Imagemeter/swift/EditCoreContext.swift b/Libraries external/Imagemeter/swift/EditCoreContext.swift deleted file mode 100644 index 4791a9070..000000000 --- a/Libraries external/Imagemeter/swift/EditCoreContext.swift +++ /dev/null @@ -1,85 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2018-2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -import Foundation - -public class EditCoreContext { - - var ecc : OpaquePointer; - - init(interactive : Bool, nRenderingThreads : Int32) { - ecc = IM_EditCoreContext_alloc(interactive, nRenderingThreads) - } - - deinit { - IM_EditCoreContext_release(ecc) - } - - - func add_font(fontFile : String) { - IM_EditCoreContext_add_font(ecc, UnsafePointer(fontFile)) - } - - func set_EditCoreUIControl(uiControl : EditCoreUIControl) { - IM_EditCoreContext_set_EditCoreUIControl(ecc, uiControl.get_C_uiControl()) - } - - func load_from_bundle_directory(bundleDirectory : String) -> IMError { - let c_err = IM_EditCoreContext_load_from_bundle_directory(ecc, UnsafePointer(bundleDirectory))! - return IMError(ptr: c_err) - } - - // enum IM_IMMLoadingState IM_EditCoreContext_get_imm_loading_state(struct IM_EditCoreContext*); - - func ready_to_initialize_openGL() -> Bool { - return IM_EditCoreContext_ready_to_initialize_openGL(ecc) - } - - func get_EditCore() -> EditCore { - let c_editcore = IM_EditCoreContext_get_EditCore(ecc)! - return EditCore(ptr: c_editcore) - } - - func load_auxiliary_files() -> IMError { - let c_err = IM_EditCoreContext_load_auxiliary_files(ecc)! - return IMError(ptr: c_err) - } - - func init_OpenGL_resources() -> IMError { - let c_err = IM_EditCoreContext_init_OpenGL_resources(ecc)! - return IMError(ptr: c_err) - } - - func set_OpenGL_viewport(viewport_width : Int32, viewport_height : Int32, density_dpi : Float) { - IM_EditCoreContext_set_OpenGL_viewport(ecc, viewport_width, viewport_height, density_dpi) - } - - func set_displayTransform_tmp() { - IM_EditCoreContext_set_displayTransform(ecc, IM_ImageFitMode_GeometricMean, false); - } - - func free_OpenGL_resources() { - IM_EditCoreContext_free_OpenGL_resources(ecc) - } - -// Manually render the scene before drawing. Only needed when there are no rendering threads. -//void render(); - -//void wait_until_rendering_is_finished(); - - func draw_to_OpenGL() { - IM_EditCoreContext_draw_to_OpenGL(ecc); - } -} diff --git a/Libraries external/Imagemeter/swift/EditCoreUIControl.swift b/Libraries external/Imagemeter/swift/EditCoreUIControl.swift deleted file mode 100644 index 2627779ef..000000000 --- a/Libraries external/Imagemeter/swift/EditCoreUIControl.swift +++ /dev/null @@ -1,36 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2018-2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -import Foundation - - -public class EditCoreUIControl { - - var uiControl : OpaquePointer; - var mCallbacks : IM_EditCoreUIControl_Callbacks; - - init(callbacks : IM_EditCoreUIControl_Callbacks) { - mCallbacks = callbacks - uiControl = IM_EditCoreUIControl_alloc(&mCallbacks) // UnsafeMutablePointer<IM_EditCoreUIControl_Callbacks>(&callbacks)) - } - - deinit { - IM_EditCoreUIControl_release(uiControl) - } - - func get_C_uiControl() -> OpaquePointer { - return uiControl - } -} diff --git a/Libraries external/Imagemeter/swift/GElement.swift b/Libraries external/Imagemeter/swift/GElement.swift deleted file mode 100644 index 00d17f6d8..000000000 --- a/Libraries external/Imagemeter/swift/GElement.swift +++ /dev/null @@ -1,42 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -import Foundation - -public class GElement { - - var gelement : OpaquePointer; - - init (ptr : OpaquePointer) { - gelement = ptr - } - - deinit { - IM_GElement_release(gelement) - } - - func set_main_line_width_magnification(magnification : Float) { - IM_GElement_set_main_line_width_magnification(gelement, magnification) - } - - func is_GText() -> Bool { - return IM_GElement_is_GText(gelement) - } - - func getCPtr() -> OpaquePointer { - return gelement - } -} - diff --git a/Libraries external/Imagemeter/swift/GText.swift b/Libraries external/Imagemeter/swift/GText.swift deleted file mode 100644 index fa303beed..000000000 --- a/Libraries external/Imagemeter/swift/GText.swift +++ /dev/null @@ -1,34 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -import Foundation - -public class GText { - - var gtext : OpaquePointer; - - init (elem : GElement) { - gtext = IM_GText_from_GElement(elem.getCPtr()) - } - - deinit { - IM_GText_release(gtext) - } - - func set_text(text : String) { - IM_GText_set_text(gtext, UnsafePointer(text)) - } -} - diff --git a/Libraries external/Imagemeter/swift/IMError.swift b/Libraries external/Imagemeter/swift/IMError.swift deleted file mode 100644 index be345bf16..000000000 --- a/Libraries external/Imagemeter/swift/IMError.swift +++ /dev/null @@ -1,28 +0,0 @@ -/* - * ImageMeter confidential - * - * Copyright (C) 2018-2019 by Dirk Farin, Kronenstr. 49b, 70174 Stuttgart, Germany - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains the property - * of Dirk Farin. The intellectual and technical concepts contained - * herein are proprietary to Dirk Farin and are protected by trade secret - * and copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Dirk Farin. - */ - -import Foundation - -public class IMError { - var error : OpaquePointer? - - init (ptr : OpaquePointer) { - error = ptr - } - - deinit { - IM_Error_release(error) - } -} diff --git a/Libraries external/Imagemeter/swift/libeditcore.swift b/Libraries external/Imagemeter/swift/libeditcore.swift deleted file mode 100755 index de6210fe3..000000000 --- a/Libraries external/Imagemeter/swift/libeditcore.swift +++ /dev/null @@ -1,49 +0,0 @@ -import Foundation - -public class Imagemeter { - - public class func computeImagemeter() -> Int32 { - return computeValue() - } - - public class func computeFaculty(n : Int32) -> Int32 { - return im_computeFaculty(n) - } - - public class func stringLength(str : String) -> Int32 { - return im_stringLength(str); - } - - public class func toUpper(str : String) -> String { - let upperCStr = UnsafeMutablePointer<Int8>(im_toUpper(str))! - let upper = String(cString: upperCStr) - free(upperCStr) - return upper - } - - public class func hash(data : [UInt8], dataSize : Int32) -> UInt8 { - return im_hash(UnsafePointer(data), dataSize); - } - - public class func encodeCodedJson(json : String) -> Data { - let codedFile = im_encodeCodedJson(UnsafePointer(json)) - - let cPtr = UnsafePointer<UInt8>(codedFile.mem)! - -// let buffer = UnsafeBufferPointer<UInt8>(start: cPtr, count: Int(codedFile.size)) -// let coded = Array(buffer) -// return coded - - let outputData = Data(bytes: cPtr, count: Int(codedFile.size)) - return outputData - } - - public class func decodeCodedJson(input : Data) -> String { - let inputData = NSData(data: input) - let ptrToInput = inputData.bytes.assumingMemoryBound(to: UInt8.self) - let cStr = UnsafeMutablePointer<Int8>(im_decodeCodedJson(ptrToInput, Int32(input.count)))! - let json = String(cString : cStr) - free(cStr) - return json - } -} |