From: joogab.yun Date: Mon, 23 Sep 2024 06:35:29 +0000 (+0900) Subject: PenWave initialization X-Git-Tag: accepted/tizen/unified/20240924.085456^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46fe69ad03687a9ad99f12f0a3cc68bb8c715485;p=platform%2Fcore%2Fuifw%2Fhand-drawing-engine.git PenWave initialization Change-Id: Ib19bfadcfd9320223596b4b6917d3ff633550a5f --- diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..cefbaed --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,23 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(pen-wave) + +SET(VERSION ${VERSION}) +FIND_PROGRAM(UNAME NAMES uname) +EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") +IF("${ARCH}" MATCHES "^arm.*") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/armv7l/ DESTINATION ${INSTALL_PREFIX}/ COMPONENT RuntimeLibraries) +ELSEIF("${ARCH}" MATCHES "^i586.*") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/i586/ DESTINATION ${INSTALL_PREFIX}/ COMPONENT RuntimeLibraries) +ELSEIF("${ARCH}" MATCHES "^i686.*") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/i586/ DESTINATION ${INSTALL_PREFIX}/ COMPONENT RuntimeLibraries) +ELSEIF("${ARCH}" MATCHES "^aarch64.*") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/aarch64/ DESTINATION ${INSTALL_PREFIX}/ COMPONENT RuntimeLibraries) +ELSEIF("${ARCH}" MATCHES "^x86_64.*") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/x86_64/ DESTINATION ${INSTALL_PREFIX}/ COMPONENT RuntimeLibraries) +ELSEIF("${ARCH}" MATCHES "^riscv64.*") +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/lib/riscv64/ DESTINATION ${INSTALL_PREFIX}/ COMPONENT RuntimeLibraries) +ENDIF() + +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/ DESTINATION ${INSTALL_RES_PREFIX}/ COMPONENT RuntimeLibraries) +INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION ${INSTALL_INC_PREFIX}/ COMPONENT RuntimeLibraries) + diff --git a/inc/renderer_ext_api.h b/inc/renderer_ext_api.h new file mode 100644 index 0000000..28dc887 --- /dev/null +++ b/inc/renderer_ext_api.h @@ -0,0 +1,1388 @@ +/* + * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + */ + +#ifndef __RENDERER_EXT_API__ +#define __RENDERER_EXT_API__ + +#include "renderer_ext_types.h" + +#ifndef EXPORT_API +#define EXPORT_API __attribute__((visibility("default"))) +#endif + + +extern "C" +{ + /** + * @brief GL initialization function + * + * @return void + */ + EXPORT_API void InitializeGL(); +#ifdef TIZEN60 + /** + * @brief function to render the frame + * + * @return void + */ + EXPORT_API void RenderFrameGL(); +#else + /** + * @brief function to render the frame + * + * @return int + */ + EXPORT_API int RenderFrameGL(); +#endif + + /** + * @brief Redraw the full screen. + */ + EXPORT_API void RenderFullyReDraw(); + + /** + * @brief function to clean up GL resources + * + * @return EXPORT_API + */ + EXPORT_API void TerminateGL(); + + /** + * @brief Update Window Size + * + * @param w Window width + * @param h Window height + * @return void + */ + EXPORT_API void UpdateGLWindowSize(int w, int h); + + /** + * @brief Get Window Size + * + * @param w Window width + * @param h Window height + * @return void + */ + EXPORT_API void GetGLWindowSize(int& w, int& h); + + /** + * @brief Update Window Orientation + * + * @param angle Rotation angle + * @return void + */ + EXPORT_API void UpdateGLWindowOrientation(int angle); + + /** + * @brief Get Window Orientation + * + * @return int + */ + EXPORT_API int GetGLWindowOrientation(); + + /** + * @brief Sets resource path + * + * @param resourcePath const char* resource path + * @return void + */ + EXPORT_API void SetResourcePath(const char* resourcePath); + + /** + * @brief Sets used dash array + * + * @param resourcePath const char* dash array + * @return void + */ + EXPORT_API void SetDashArray(const char* dashArray); + + /** + * @brief Gets resource path + * + * @return char* + */ + EXPORT_API const char* GetResourcePath(); + + /** + * @brief Sets font path + * + * @param fontPath Font path. + * @return void + */ + EXPORT_API void SetFontPath(const char* fontPath); + + /** + * @brief Gets font path + * + * @return const char* + */ + EXPORT_API const char* GetFontPath(); + + /** + * @brief Set the Texture Paths object + * + * @param texturePaths Texture paths. + * @param textureCount Number of textures. + * @return void + */ + EXPORT_API void SetTexturePaths(const char* texturePaths[], int textureCount); + + /** + * @brief Get the Texture Paths count + * + * @return int + */ + EXPORT_API int GetTexturePathsCount(); + + /** + * @brief Get the Texture Path by it's index + * + * @return const char* + */ + EXPORT_API const char* GetTexturePath(const int texturePathIndex); + + /** + * @brief Start point for drawing + * + * @param x Point X coor + * @param y Point Y coor + * @return unsigned unique shape id + */ + EXPORT_API unsigned BeginShapeDraw(float x, float y, unsigned time); + + /** + * @brief Start point for drawing shape with specific attributes + * + * @param x float Point X coor + * @param y float Point Y coor + * @param shapeType int shape type + * @param radius float stroke radius + * @param hexColor const char* HEX code for color + * @param a float color alpha + * @param textureID int ID of brush texture, argument used only with brush + * @param textureDistance float distance between textures in brush, argument used only with brush + * @param dashArray const char* dashed stroke pattern, argument used only with dashed stroke + * @param ttime unsigned + * @return unsigned unique shape id + */ + EXPORT_API unsigned BeginSpecificShapeDraw(float x, float y, int strokeType, const char* hexColor, float a, float radius, int textureID, float textureDistance, const char* dashArray, unsigned ttime); + + /** + * @brief Draw points on cavas + * + * @param shapeID ID of drawn shape + * @param x Point X coor + * @param y Point Y coor + * @retval 0 No error in adding points + * @retval 1 Too many points (new shape has to be created) + * @retval 2 No canvas set + * @retval 3 No shapes in canvas + * @retval 4 Bad shapeID (not exists) + * @retval 5 Object with id=shapeID is not a shape + * + */ + EXPORT_API int DrawShape(unsigned shapeID, float x, float y, unsigned time); + + /** + * @brief Finish shape drawing + * + * @param shapeID ID of drawn shape + * @return void + * @retval 0 No error in adding points + * @retval 1 Too many points (new shape has to be created) + * @retval 2 No canvas set + * @retval 3 No shapes in canvas + * @retval 4 Bad shapeID (not exists) + * @retval 5 Object with id=shapeID is not a shape + */ + EXPORT_API int EndShapeDraw(unsigned shapeID, unsigned time); + + /** + * @brief Start point for line + * + * @param x Point X coor + * @param y Point Y coor + * @param ttime unsigned + * @return unsigned unique shape id + */ + EXPORT_API unsigned BeginLineDraw(float x, float y, unsigned time); + + /** + * @brief Draw line on cavas + * + * @param lineID ID of drawn line + * @param x Point X coor + * @param y Point Y coor + * @param ttime unsigned + * @retval 0 No error in adding points + * @retval 1 Too many points (new shape has to be created) + * @retval 2 No canvas set + * @retval 3 No shapes in canvas + * @retval 4 Bad shapeID (not exists) + * @retval 5 Object with id=shapeID is not a shape + * + */ + EXPORT_API int DrawLine(unsigned lineID, float x, float y, unsigned time); + + /** + * @brief End drawing line on cavas + * + * @param lineID ID of drawn line + * @param ttime unsigned + * @retval 0 No error in adding points + * @retval 1 Too many points (new shape has to be created) + * @retval 2 No canvas set + * @retval 3 No shapes in canvas + * @retval 4 Bad shapeID (not exists) + * @retval 5 Object with id=shapeID is not a shape + */ + EXPORT_API int EndLineDraw(unsigned lineID, unsigned ttime); + + /** + * @brief Adding rectangle with properties of current stroke + * + * @param xStart coor of upper left corner of rectangle + * @param yStart coor of upper left corner of rectangle + * @param x coor of bottom right corner + * @param y coor of bottom right corner + * @param finished true if drawing of rectangle is finished, false when it is set as current shape and has to be call FinishRectanglePath at the end of drawing + + */ + EXPORT_API unsigned AddRectanglePath(float xStart, float yStart, float x, float y, bool finished); + + /** + * @brief Adding arc with properties of current stroke + * + * @param xCenter coor of center of circle + * @param yCenter coor of center of circle + * @param radius radius of circle + * @param x coor of start point + * @param y coor of start point + * @param finished true if drawing of rectangle is finished, false when it is set as current shape and has to be call FinishRectanglePath at the end of drawing + + */ + EXPORT_API unsigned AddArcPath(float xCenter, float yCenter, float radius, float x, float y, bool finished); + /** + * @brief Resize shape on canvas (rectangle or arc) + * + * @param shapeID ID of drawn shape + * @param x Point X coor of changed point + * @param y Point Y coor of changed point + * @retval 0 No error in adding points + * @retval 1 Too many points (new shape has to be created) + * @retval 2 No canvas set + * @retval 3 No shapes in canvas + * @retval 4 Bad shapeID (not exists) + * @retval 5 Object with id=shapeID is not a shape + * + */ + EXPORT_API int ResizeShapePath(unsigned shapeID, float x, float y); + + /** + * @brief End drawing shape on cavas (rectangle or arc) + * + * @param shapeID ID of drawn shape + * @retval 0 No error in adding points + * @retval 1 Too many points (new shape has to be created) + * @retval 2 No canvas set + * @retval 3 No shapes in canvas + * @retval 4 Bad shapeID (not exists) + * @retval 5 Object with id=shapeID is not a shape + */ + EXPORT_API int FinishShapePath(unsigned shapeID); + /** + * @brief Zoom Canvas Begin + * @return false if some shape is being drawn, true otherwise + */ + EXPORT_API bool CanvasZoomBegin(); + + /** + * @brief Zoom Canvas Point + * + * @param x Point X coord + * @param y Point Y coord + * @param zoom Zoom level + * @param dx + * @param dy + * @return false if zooming wasn't started with CanvasZoomBegin, true otherwise. + */ + EXPORT_API bool CanvasZoom(float x, float y, float zoom, float dx, float dy); + + /** + * @brief Zoom Canvas End + * @return false if zooming wasn't started with CanvasZoomBegin, true otherwise. + */ + EXPORT_API bool CanvasZoomEnd(); + + /** + * @brief Set Zoom Canvas Value + * + * @param zoomValue set zoom level + * @return void + */ + EXPORT_API void CanvasSetZoomValue(float zoomValue); + + /** + * @brief Get Zoom Canvas Value + * + * @return int zoom level + */ + EXPORT_API int CanvasGetZoomValue(); + + /** + * @brief Move Canvas Begin + * @return false if some shape is being drawn, true otherwise + */ + EXPORT_API bool CanvasMoveBegin(); + + /** + * @brief Move Canvas Area + * + * @param x Point X coord + * @param y Point Y coord + * @return false if moving wasn't started with CanvasMoveBegin, true otherwise. + */ + EXPORT_API bool CanvasMove(int x, int y); + + /** + * @brief Move Canvas End + * @return false if moving wasn't started with CanvasMoveBegin, true otherwise. + */ + EXPORT_API bool CanvasMoveEnd(); + + /** + * @brief Get canvas position + * @return void + */ + EXPORT_API void CanvasGetPosition(int& x, int& y); + + /** + * @brief Sets canvas size + * + * @param width new canvas width + * @param height new canvas height + * @return void + */ + EXPORT_API void CanvasSetSize(int width, int height); + + /** + * @brief Get current canvas size + * + * @param width canvas width + * @param height canvas height + * @return void + */ + EXPORT_API void CanvasGetSize(int& width, int& height); + + /** + * @brief Erase selected shape + * + * @param x Point X coord + * @param y Point Y coord + * @param partial If true, only the touched parts of the shape are erased, otherwise the whole shape is erased. + * @return bool + */ + EXPORT_API bool EraseShape(int x, int y, float radius, bool partial); + + /** + * @brief Erase slice of canvas + * + * @param x position of top left corner of slice + * @param y position of top left corner of slice + * @param width of slice to be ereased + * @param height of slice to be ereased + * @return bool + */ + EXPORT_API bool EraseCanvasSlice(float x, float y, float width, float height); + + /** + * @brief Set Canvas Color + * + * @param r float Red Color Value + * @param g float Green Color Value + * @param b float Blue Color Value + * @param a float Alpha Value + * @return void + */ + EXPORT_API void CanvasSetColor(const char* hexColor, float a); + + /** + * @brief Get Canvas Color + * + * @param hexColor string representig brush color in use + * @return float color alpha value + */ + EXPORT_API float CanvasGetColor(char* hexColor); + + /** + * @brief Set the radius of stroke line + * + * @param val float Brush size + * @return void + */ + EXPORT_API void SetStrokeSize(float val); + + /** + * @brief Set the stroke color + * + * @param r float Red Color Value + * @param g float Green Color Value + * @param b float Blue Color Value + * @param a float Alpha Value + * @return void + */ + + EXPORT_API void SetStrokeColor(const char* hexColor, float a); + + /** + * @brief Set the stroke type + * + * @param strokeTypeId int Brush type + * @return void + */ + EXPORT_API void SetStrokeType(int strokeTypeId); + + /** + * @brief Set the brush texture + * + * @param textureId int Brush texture + * @return void + */ + EXPORT_API void SetBrushTexture(int textureId); + + /** + * @brief Set the distance between neighbouring textures in brush + * + * @param distance float Brush distance + * @return void + */ + EXPORT_API void SetBrushDistance(float distance); + + /** + * @brief Set the line angle + * + * @param angle float line angle in degrees + * @return void + */ + EXPORT_API void SetLineAngle(float angle); + + /** + * @brief Set the line type + * + * @param lineTypeId int Brush type + * @return void + */ + EXPORT_API void SetLineType(int lineTypeId); + + /** + * @brief Set current layer. + * + * @param layer unsigned layer index. + * @return void + */ + EXPORT_API void SetCurrentLayer(unsigned layer); + + /** + * @brief Create Canvas + * + * @param canvasWidth canvas width + * @param canvasHeight canvas height + * @return unsigned + */ + EXPORT_API unsigned CreateCanvas(int canvasWidth, int canvasHeight); + + /** + * @brief Create Canvas + * + * @param canvasWidth canvas page width + * @param canvasHeight canvas page height + * @param horizontal whether pages should scroll horizontally or vertically + * @return unsigned + */ + EXPORT_API unsigned CreatePagedCanvas(int canvasWidth, int canvasHeight, bool horizontal); + + /** + * @brief Create Canvas + * + * @param bgPath image path + * @return unsigned + */ + EXPORT_API unsigned CreateCanvasWithBackgroundImage(const char* bgPath); + + /** + * @brief Get Current Canvas ID + * + * @return unsigned + */ + EXPORT_API unsigned GetCurrentCanvasID(); + + /** + * @brief Set Current Canvas + * + * @param canvasID canvas id + * @return void + */ + EXPORT_API void SetCurrentCanvas(unsigned canvasID); + + /** + * @brief Clear Current Canvas + * + * @return void + */ + EXPORT_API void ClearCurrentCanvas(); + + /** + * @brief Check if canvas is clear + * + * @return bool + */ + EXPORT_API bool CurrentCanvasEmpty(); + + /** + * @brief Save canvas to file + * + * @param canvasID id to save + * @param name Name to save + * @return bool + */ + EXPORT_API bool SaveCanvas(unsigned canvasID, const char* name); + + /** + * @brief Load canvas from file + * + * @param canvasID canvas id to load + * @param name canvas name to load + * @return bool + */ + EXPORT_API bool LoadCanvas(unsigned canvasID, const char* name); + + /** + * @brief Remove canvas specified by id. + * + * @param canvasID + * @return bool Returns true if canvas was successfully removed. + */ + EXPORT_API bool RemoveCanvas(unsigned canvasID); + + /** + * @brief Add new page to the current canvas, after the last one. + * + * @return bool true if canavs is paged an operation was succesfull, or false otherwise + */ + EXPORT_API bool AddCanvasPage(); + + /** + * @brief Add new page to the current canvas, just after pageID-th one (pages are numbered from 1) + * + * @return bool true if canavs is paged an operation was succesfull, or false otherwise + */ + EXPORT_API bool InsertCanvasPage(unsigned pageID); + + /** + * @brief Deletes page from the current canvas with id = pageID (pages are numbered from 1) + * + * @return bool true if canavs is paged an operation was succesfull, or false otherwise + */ + EXPORT_API bool DeleteCanvasPage(unsigned pageID); + + /** + * @brief Returns number of current canvas pages currently, or 0 if canvas isn't paged + * + * @return Number of pages of the current canvas or 0 if it isn't paged. + */ + EXPORT_API unsigned CanvasNumberOfPages(); + + /** + * @brief Dump canvas to bmp file + * + * @param canvasID + * @param path + * @param x + * @param y + * @param width + * @param height + * @param saved + * @return void + */ + EXPORT_API void TakeScreenshot(unsigned canvasID, const char* path, int x, int y, int width, int height, + void *saved); + + /** + * @brief Dump + * + * @return void + */ + EXPORT_API void Dump(); + + /** + * @brief Export specific parts of canvas to pdf file + * + * @param filename path to export file + * @param x position X on canvas + * @param y position Y on canvas + * @param w width of canvas slice + * @param h height of canvas slice + * @param pageWidth width of pdf page + * @param pageHeight height of pdf page + * @return bool if file was saved successfully + */ + EXPORT_API bool ExportToFile(const char* filename, float x, float y, float w, float h, float pageWidth, float pageHeight); + + /** + * @brief Get Current Brush Size + * + * @return float Brush Size + */ + EXPORT_API float GetBrushSize(); + + /** + * @brief Get Current Brush Color + * @param hexColor string representig brush color in use + * + * @return float alpha factor + */ + EXPORT_API float GetBrushColor(char* hexColor); + + /** + * @brief Get Current Brush Type + * + * @return int + */ + EXPORT_API int GetBrushType(); + + /** + * @brief Get Current Brush Texture + * + * @return int + */ + EXPORT_API int GetBrushTexture(); + + /** + * @brief Get the distance between neighbouring textures in brush + * + * @return float + */ + EXPORT_API float GetBrushDistance(); + + /** + * @brief Get Current Line Angle + * + * @return float line angle in degrees + */ + EXPORT_API float GetLineAngle(); + + /** + * @brief Get Current Line Type + * + * @return int + */ + EXPORT_API int GetLineType(); + + /** + * @brief Get current layer index. + * + * @return unsigmed layer index. + */ + EXPORT_API unsigned GetCurrentLayer(); + + /** + * @brief Return number of layers. + * + * @return unsigned should return at least 1, if 0 something went wrong. + */ + EXPORT_API unsigned GetLayerCount(); + + /** + * @brief Start rotating selected shapes + * + * @param x float cursor position + * @param y float cursor position + * @return bool + */ + EXPORT_API bool StartRotating(float x, float y); + + /** + * @brief Rotate selected shapes + * + * @param x float cursor position + * @param y float cursor position + * @return bool + */ + EXPORT_API bool RotateSelected(float x, float y); + + /** + * @brief Finish rotating selected shapes + * + * @param x float cursor position + * @param y float cursor position + * @return bool + */ + EXPORT_API bool EndRotating(float x, float y); + + /** + * @brief Define Selecting Area + * @param x + * @param y + * The engine will display the selection + * + * @return void + */ + EXPORT_API void StartSelectingArea(float x, float y); + + /** + * @brief Define Selecting Area + * @param x + * @param y + * @param showSelection should engine display selected area + * + * @return void + */ + EXPORT_API void StartSelectingAreaOptionalVisibility(float x, float y, bool showSelection); + + /** + * @brief Resize Current Selected Area + * + * @return bool + */ + EXPORT_API bool ResizeSelectedArea(float x, float y); + + /** + * @brief Is inside selected area + * @param x + * @param y + * + * @return bool + */ + EXPORT_API bool InsideSelectedArea(float x, float y); + + /** + * @brief Get screen-space position of top-left corner and size of current selection + * @param x float destination reference for horizontal position or NaN if no selection is present + * @param y float destination reference for vertical position or NaN if no selection is present + * @param width float destination reference for selection width or NaN if no selection is present + * @param height float destination reference for selection height or NaN if no selection is present + * + * @return bool true if selection exists, false otherwise + */ + EXPORT_API bool GetSelectionDimensions(float &x, float &y, float &width, float &height); + + /** + * @brief if selection exists, toggles its visibility + * + * @return bool true if selection exists, false otherwise + */ + EXPORT_API bool ToggleSelectionDisplay(); + + /** + * @brief TouchedDrawable + * @param x + * @param y + * + * @return int + */ + EXPORT_API int TouchedDrawable(float x, float y); + + /** + * @brief Select Drawable + * @param x + * @param y + * The engine will display selected area + * + * @return int + */ + EXPORT_API int SelectDrawable(float x, float y); + + /** + * @brief Select Drawable + * @param x + * @param y + * @param showSelection should engine display selected area + * + * @return int + */ + EXPORT_API int SelectDrawableOptionalVisibility(float x, float y, bool showSelection); + + /** + * @brief Select Drawables + * + * @return int + */ + EXPORT_API int SelectDrawables(); + + /** + * @brief Drag Selected Drawables + * @param x + * @param y + * + * @return bool + */ + EXPORT_API bool DragSelectedDrawables(float x, float y); + + /** + * @brief End Draging + * + * @return bool + */ + EXPORT_API bool EndDraging(); + + /** + * @brief Drop Selected Drawables + * + * @return void + */ + EXPORT_API void DropSelectedDrawables(); + + /** + * @brief Raise Selected Drawables + * + * @return void + */ + EXPORT_API void RaiseSelectedDrawables(); + + /** + * @brief Zoom Selected Area + * @param x + * @param y + * @param zoom + * + * @return void + */ + EXPORT_API void SelectedAreaZoom(float x, float y, float zoom); + + /** + * @brief Initialize scaling of selected area. + * Selecting neither or both of left/right or bottom/top anchor will put the anchor in the middle of relevant axis + * @param anchorLeft place anchor on the left side of current selection + * @param anchorRight place anchor on the right side of current selection + * @param anchorTop place anchor on the bottom side of current selection + * @param anchorBottom place anchor on the top side of current selection + * @param anchorX x cooridinate of anchor point + * @param anchorY y cooridinate of anchor point + * + * @return void + */ + EXPORT_API void StartSelectionScale(bool anchorLeft, bool anchorRight, bool anchorTop, bool anchorBottom, float& anchorX, float& anchorY); + + /** + * @brief Scale Selected Area + * @param scaleFactorX horizontal scale factor relative to initial size + * @param scaleFactorY vertical scale factor relative to initial size + * + * @return void + */ + EXPORT_API void ScaleSelection(float scaleFactorX, float scaleFactorY); + + /** + * @brief Finalize scaling of selected area + * @param scaleFactorX final horizontal scale factor relative to initial size + * @param scaleFactorY final vertical scale factor relative to initial size + * + * @return void + */ + EXPORT_API void EndSelectionScale(float scaleFactorX, float scaleFactorY); + + /** + * @brief ToggleGrid + * + * @return void + */ + EXPORT_API void ToggleGrid(int densityType); + + /** + * @brief GetGridDensity + * + * @return int + */ + EXPORT_API int GetGridDensity(); + + /** + * @brief Toggle Chart Grid + * @param densityType grid density + * + * @return void + */ + EXPORT_API void ToggleChartGrid(int densityType); + + /** + * @brief Get Chart Grid Density + * + * @return int chart grid density + */ + EXPORT_API int GetChartGridDensity(); + + /** + * @brief Copy shape + * + * @return bool copy result + */ + EXPORT_API bool Copy(); + + /** + * @brief Paste shape in position + * @param x + * @param y + * + * @return int paste result + */ + EXPORT_API int Paste(float x, float y); + + /** + * @brief Cut shape + * + * @return bool cut result + */ + EXPORT_API bool Cut(); + + /** + * @brief Remove selected shape + * + * @return bool remove result + */ + EXPORT_API bool Remove(); + + /** + * @brief Add chart + * @param chartType chart type + * @param path path to chart + * + * @return void + */ + EXPORT_API void AddChart(int chartType, const char* path); + + /** + * @brief Change mode + * @param mode new mode + * + * @return void + */ + EXPORT_API void ChangeMode(int mode); + + /** + * @brief Chart Position + * @param x [out] current chart x position + * @param y [out] current chart y position + * + * @return void + */ + EXPORT_API void ChartPosition(float& x, float& y); + + /** + * @brief Add Picture to canvas with original size and at 0;0 position + * @param path to file + * + * @return void + */ + EXPORT_API void AddPicture(const char* path); + + /** + * @brief Place picture at specific position on canvas + * @param path to file + * @param x position on canvas + * @param y position on canvas + * @param width of picture + * @param height of picture + * + * @return void + */ + EXPORT_API void PlacePicture(const char* path, float x, float y, float width, float height); + + /** + * @brief Set Canvas Background + * @param path picture path + * @param x background x position on canvas + * @param y background y position on canvas + * @param width background width + * @param height background height + * + * @return void + */ + EXPORT_API void SetCanvasBackground(const char* path, float x, float y, float width, float height); + + /** + * @brief Add Text + * @param text text to add + * @param x text x position + * @param y text y position + * @param size text size + * + * @return void + */ + EXPORT_API void AddText(const char* text, float x, float y, float size); + + /** + * @brief Add layer, and set it as a current layer. + * + * @return unsigned layer index. + */ + EXPORT_API unsigned AddLayer(); + + /** + * @brief Remove layer. If the layer was set as a current it will be changed to the previous layer. If there is only one layer nothing happens. + * @param layer unsigned layer index. + * + * @return void + */ + EXPORT_API void RemoveLayer(unsigned layer); + + /** + * @brief Hide layer. If there is only one, nothing will happen. + * @param layer unsigned layer index. + * + * @return void + */ + EXPORT_API void HideLayer(unsigned layer); + + /** + * @brief Show layer. + * @param layer unsigned layer index. + * + * @return void + */ + EXPORT_API void ShowLayer(unsigned layer); + + /** + * @brief Check if layer is hidden. + * @param layer unsigned layer index. + * + * @return bool true if layer is hidden. + */ + EXPORT_API bool IsLayerHidden(unsigned layer); + + /** + * @brief Move current layer index. + * @param newIndex unsigned new index of the current layer. + * + * @return void + */ + EXPORT_API void MoveLayer(unsigned newIndex); + + /** + * @brief Add Note. + * @param x float x position + * @param y float y position + * @param w float width + * @param h float height + * + * @return unsigned note id + */ + EXPORT_API unsigned AddNote(float x, float y, float w, float h); + + /** + * @brief Remove note with passed id. + * @param noteID unsigned id of the note + * + * @return void + */ + EXPORT_API void RemoveNote(unsigned noteID); + + /** + * @brief Get id of the current note. + * + * @return unsigned current note id, if there is no notes 0 is returned + */ + EXPORT_API unsigned GetCurrentNote(); + + /** + * @brief Get number of notes. + * + * @return unsigned number of notes + */ + EXPORT_API unsigned GetNoteCount(); + + /** + * @brief Clear all drawables from the active note. + * + * @return void + */ + EXPORT_API void ClearNote(); + + /** + * @brief Drag the active note. + * @param x float x position + * @param y float y position + * + * @return void + */ + EXPORT_API bool DragNote(float x, float y); + + /** + * @brief End dragging of the active note. + * + * @return bool true if success + */ + EXPORT_API bool EndNoteDragging(); + + /** + * @brief Resize the active note. + * @param w float width + * @param h float height + * + * @return void + */ + EXPORT_API void ResizeNote(float w, float h); + + /** + * @brief Set color of the active note. + * @param hexColor const char* hex code of the color + * @param a float alpha + * + * @return void + */ + EXPORT_API void SetNoteColor(const char* hexColor, float a); + + /** + * @brief Set active note. + * @param noteID unsigned id of the note + * + * @return void + */ + EXPORT_API void SetActiveNote(unsigned noteID); + + /** + * @brief Check if any of the notes was touched. + * @param x float x position + * @param y float y position + * + * @return unsigned id of the touched note, if the notes are overlaid the id of the top one will be returned + */ + EXPORT_API unsigned TouchedNote(float x, float y); + + /** + * @brief Save note to the file. + * @param noteID unsigned id of the note to be saved + * @param path const char* path where the note will be saved + * + * @return bool true if success + */ + EXPORT_API bool SaveNote(unsigned noteID, const char* path); + + /** + * @brief Load a note from the file. + * @param path const char* path with the filename + * + * @return unsigned id of the note + */ + EXPORT_API unsigned LoadNote(const char* path); + + /** + * @brief Creates Toolbar with UI for the given noteID. + * @param noteID unsigned id of the note + * + * @return void + */ + EXPORT_API void AddNoteToolbar(unsigned noteID); + + /** + * @brief Adds an icon to the note toolbar ui config. + * @param iconImagePath const char* path to the icon's image + * + * @return void + */ + EXPORT_API void AddNoteToolbarIcon(const char* iconImagePath); + + /** + * @brief Sets toolbar's position. + * @param position int enum ToolbarPosition::Top = 0, ToolbarPosition::Botom = 1 + * + * @return void + */ + EXPORT_API void SetNoteToolbarPosition(int position); + + /** + * @brief Sets toolbar's height. + * @param h float height of the toolbar + * + * @return void + */ + EXPORT_API void SetNoteToolbarHeight(float h); + + /** + * @brief Sets toolbar's color brightness. + * @param factor float factor, values less than 1 make the color darker, greater make it brighter. + * + * @return void + */ + EXPORT_API void SetNoteToolbarColorFactor(float factor); + + /** + * @brief Sets toolbar's icon alignment. + * @param alignment int enum ToolbarIconAlignment::Left = 0, ToolbarIconAlignment::Middle = 1, ToolbarIconAlignment::Right = 3 + * + * @return void + */ + EXPORT_API void SetNoteToolbarIconAlignment(int alignment); + + /** + * @brief Sets toolbar's icon spacing. + * @param spacing float icon spacing + * + * @return void + */ + EXPORT_API void SetNoteToolbarIconSpacing(float spacing); + + /** + * @brief Sets toolbar's icon size. + * @param w float width of the icon + * @param h float height of the icon + * + * @return void + */ + EXPORT_API void SetNoteToolbarIconSize(float w, float h); + + /** + * @brief Sets icon's vertical border. + * @param border float vertical border size + * + * @return void + */ + EXPORT_API void SetNoteToolbarIconVerticalBorder(float border); + + /** + * @brief Sets icon's horizontal border. + * @param border float horizontal border size + * + * @return void + */ + EXPORT_API void SetNoteToolbarIconHorizontalBorder(float border); + + /** + * @brief Sets border's thickness. + * @param border float thickness + * + * @return void + */ + EXPORT_API void SetNoteToolbarBorderThickness(float thickness); + + /** + * @brief Sets border's color brightness. + * @param factor float factor, values less than 1 make the color darker, greater make it brighter. + * + * @return void + */ + EXPORT_API void SetNoteToolbarBorderColorFactor(float factor); + + /** + * @brief Enables border around notes and toolbar + * @param enable bool + * + * @return void + */ + EXPORT_API void SetNoteToolbarBorder(bool enable); + + /** + * @brief Loads UI config from the file. + * @param filePath const char* path to the ui config file + * + * @return void + */ + //TODO: EXPORT_API void LoadNoteToolbarConfig(const char* filePath) + + /** + * @brief RecognizeShapesFromSelection + * + * @return void + */ + EXPORT_API void RecognizeShapesFromSelection(); + + /** + * @brief ToggleShapesRecognition + * + * @return void + */ + EXPORT_API void ToggleShapesRecognition(); + + /** + * @brief RecognizeTextFromSelection + * + * @return char* + */ + EXPORT_API const char* RecognizeTextFromSelection(); + + /** + * @brief Undo + * + * @return bool + */ + EXPORT_API bool Undo(); + + /** + * @brief Redo + * + * @return bool + */ + EXPORT_API bool Redo(); + + /** + * @brief Reset Undo + * + * @return void + */ + EXPORT_API void ResetUndo(); + + /** + * @brief Reset Redo + * + * @return void + */ + EXPORT_API void ResetRedo(); + + /** + * @brief Stop Erasing + * + * @return bool + */ + EXPORT_API bool StopErasing(); + + /** + * @brief Get All Configurations array from the engine + */ + EXPORT_API ConfigParam* GetAllConfigurations(void); + + /** + * @brief Get Configuration array count from the engine + */ + EXPORT_API unsigned GetConfigurationCount(); + + /** + * @brief Get Specific Configuration from the engine + */ + EXPORT_API ConfigParam* GetConfiguration(const char* name); + + /** + * @brief Set Specific Configuration from the engine + */ + EXPORT_API bool SetConfigurationInt(const char* name, int value); + + /** + * @brief Set Specific Configuration from the engine + */ + EXPORT_API bool SetConfigurationFloat(const char* name, float value); + + /** + * @brief Set Specific Configuration from the engine + */ + EXPORT_API bool SetConfigurationBool(const char* name, bool value); + + /** + * @brief Set Specific Configuration from the engine + */ + EXPORT_API bool SetConfigurationString(const char *name, const char *value); + + /** + * @brief Save profiler + */ + EXPORT_API void SaveProfiler(const char *path); + + /** + * @brief Reset profiler + */ + EXPORT_API void ResetProfiler(); + + /** + * @brief Begin shape + */ + EXPORT_API unsigned BeginShape(float x, float y, const char* hexColor, float alpha, int brushTypeId, int textureId, float fRadius, unsigned ttime); +} + +#endif diff --git a/inc/renderer_ext_types.h b/inc/renderer_ext_types.h new file mode 100644 index 0000000..44c29c9 --- /dev/null +++ b/inc/renderer_ext_types.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved + */ + +#ifndef __RENDERER_EXT_TYPES_H__ +#define __RENDERER_EXT_TYPES_H__ + +extern "C" +{ + /** + * @brief type of the configuraiton parameter. + * + * For now we supported parameters: int, float, char*, bool + */ + typedef enum + { + CONFIG_PARAM_TYPE_INT, + CONFIG_PARAM_TYPE_FLOAT, + CONFIG_PARAM_TYPE_STRING, + CONFIG_PARAM_TYPE_BOOL + } ConfigParamType; + + /** + * @brief Engine Configuration parameter. + * + * Configuration was introduced to don't break + * API compatibility when new configuraitons will + * be added. + */ + typedef struct + { + float step; + float min; + float max; + + char paramName[256]; + ConfigParamType type; + + union + { + int i; + float f; + char* s; + bool b; + } data; + } ConfigParam; +} + +#endif //__RENDERER_EXT_TYPES_H__ diff --git a/lib/aarch64/libpen-wave.so b/lib/aarch64/libpen-wave.so new file mode 120000 index 0000000..f8476cd --- /dev/null +++ b/lib/aarch64/libpen-wave.so @@ -0,0 +1 @@ +libhand-drawing-engine.so.1 \ No newline at end of file diff --git a/lib/aarch64/libpen-wave.so.1 b/lib/aarch64/libpen-wave.so.1 new file mode 120000 index 0000000..cf31b35 --- /dev/null +++ b/lib/aarch64/libpen-wave.so.1 @@ -0,0 +1 @@ +libhand-drawing-engine.so.1.4.0 \ No newline at end of file diff --git a/lib/aarch64/libpen-wave.so.1.4.0 b/lib/aarch64/libpen-wave.so.1.4.0 new file mode 100755 index 0000000..c4e06ff Binary files /dev/null and b/lib/aarch64/libpen-wave.so.1.4.0 differ diff --git a/lib/armv7l/libpen-wave.so b/lib/armv7l/libpen-wave.so new file mode 120000 index 0000000..f8476cd --- /dev/null +++ b/lib/armv7l/libpen-wave.so @@ -0,0 +1 @@ +libhand-drawing-engine.so.1 \ No newline at end of file diff --git a/lib/armv7l/libpen-wave.so.1 b/lib/armv7l/libpen-wave.so.1 new file mode 120000 index 0000000..cf31b35 --- /dev/null +++ b/lib/armv7l/libpen-wave.so.1 @@ -0,0 +1 @@ +libhand-drawing-engine.so.1.4.0 \ No newline at end of file diff --git a/lib/armv7l/libpen-wave.so.1.4.0 b/lib/armv7l/libpen-wave.so.1.4.0 new file mode 100755 index 0000000..3678e05 Binary files /dev/null and b/lib/armv7l/libpen-wave.so.1.4.0 differ diff --git a/lib/i586/libpen-wave.so b/lib/i586/libpen-wave.so new file mode 120000 index 0000000..f8476cd --- /dev/null +++ b/lib/i586/libpen-wave.so @@ -0,0 +1 @@ +libhand-drawing-engine.so.1 \ No newline at end of file diff --git a/lib/i586/libpen-wave.so.1 b/lib/i586/libpen-wave.so.1 new file mode 120000 index 0000000..cf31b35 --- /dev/null +++ b/lib/i586/libpen-wave.so.1 @@ -0,0 +1 @@ +libhand-drawing-engine.so.1.4.0 \ No newline at end of file diff --git a/lib/i586/libpen-wave.so.1.4.0 b/lib/i586/libpen-wave.so.1.4.0 new file mode 100755 index 0000000..651b93c Binary files /dev/null and b/lib/i586/libpen-wave.so.1.4.0 differ diff --git a/lib/riscv64/libpen-wave.so b/lib/riscv64/libpen-wave.so new file mode 120000 index 0000000..f8476cd --- /dev/null +++ b/lib/riscv64/libpen-wave.so @@ -0,0 +1 @@ +libhand-drawing-engine.so.1 \ No newline at end of file diff --git a/lib/riscv64/libpen-wave.so.1 b/lib/riscv64/libpen-wave.so.1 new file mode 120000 index 0000000..cf31b35 --- /dev/null +++ b/lib/riscv64/libpen-wave.so.1 @@ -0,0 +1 @@ +libhand-drawing-engine.so.1.4.0 \ No newline at end of file diff --git a/lib/riscv64/libpen-wave.so.1.4.0 b/lib/riscv64/libpen-wave.so.1.4.0 new file mode 100755 index 0000000..ad2954c Binary files /dev/null and b/lib/riscv64/libpen-wave.so.1.4.0 differ diff --git a/lib/x86_64/libpen-wave.so b/lib/x86_64/libpen-wave.so new file mode 120000 index 0000000..f8476cd --- /dev/null +++ b/lib/x86_64/libpen-wave.so @@ -0,0 +1 @@ +libhand-drawing-engine.so.1 \ No newline at end of file diff --git a/lib/x86_64/libpen-wave.so.1 b/lib/x86_64/libpen-wave.so.1 new file mode 120000 index 0000000..cf31b35 --- /dev/null +++ b/lib/x86_64/libpen-wave.so.1 @@ -0,0 +1 @@ +libhand-drawing-engine.so.1.4.0 \ No newline at end of file diff --git a/lib/x86_64/libpen-wave.so.1.4.0 b/lib/x86_64/libpen-wave.so.1.4.0 new file mode 100755 index 0000000..98924a0 Binary files /dev/null and b/lib/x86_64/libpen-wave.so.1.4.0 differ diff --git a/packaging/pen-wave.manifest b/packaging/pen-wave.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/pen-wave.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/pen-wave.spec b/packaging/pen-wave.spec new file mode 100644 index 0000000..f7196f7 --- /dev/null +++ b/packaging/pen-wave.spec @@ -0,0 +1,89 @@ +Name: pen-wave +Summary: PenWave Rendering Engine +%define ver_str 1.4.0 +Version: %{ver_str} +Release: 2 +Group: DALI/NUI +License: Apache-2.0 +Source0: %{name}.tar.gz +Source1001: %{name}.manifest + +Requires(post): /sbin/ldconfig +Requires(postun): /sbin/ldconfig + +BuildRequires: pkgconfig +BuildRequires: cmake + +%description +Description: PenWave Engine + +%{!?TZ_SYS_RO_SHARE: %global TZ_SYS_RO_SHARE /usr/share} +%global _libshare /usr/share/libpen-wave/ + +%package devel +Summary: PenWave Engine(Development) +Requires: %{name} = %{version}-%{release} + +%description devel +%devel_desc + +#### +# Preparation +#### +%prep +%setup -q -n %{name} +cp %{SOURCE1001} . + +cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIBDIR=%{_libdir} \ + -DINSTALL_PREFIX=%{_libdir} \ + -DINSTALL_RES_PREFIX=%{_libshare} \ + -DINSTALL_INC_PREFIX=%{_includedir} \ + -DTZ_SYS_RO_SHARE=%TZ_SYS_RO_SHARE + +#### +# Build +#### +%build +export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE" +export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE" +export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE" +make %{?jobs:-j%jobs} + +#### +# Installation +#### +%install +rm -rf %{buildroot} + +%make_install + +#### +# Post Install +#### +%post +/sbin/ldconfig +exit 0 + +#### +# Post Uninstall +#### +%postun +/sbin/ldconfig +exit 0 + +#### +# Files in Binary Packages +#### +%files +%manifest %{name}.manifest +%defattr(-,root,root,-) +%{_libdir}/* +%{_libshare}/target/*.conf +%{_libshare}/images/textures/*.png +%{_libshare}/fonts/*.ttf + +%files devel +%manifest %{name}.manifest +%{_includedir}/renderer_ext_api.h +%{_includedir}/renderer_ext_types.h +%{_libdir}/* diff --git a/res/fonts/font.ttf b/res/fonts/font.ttf new file mode 100644 index 0000000..b173da2 Binary files /dev/null and b/res/fonts/font.ttf differ diff --git a/res/images/textures/brush_acrylic.png b/res/images/textures/brush_acrylic.png new file mode 100644 index 0000000..2dcb4c0 Binary files /dev/null and b/res/images/textures/brush_acrylic.png differ diff --git a/res/images/textures/brush_sponge.png b/res/images/textures/brush_sponge.png new file mode 100644 index 0000000..904bb9c Binary files /dev/null and b/res/images/textures/brush_sponge.png differ diff --git a/res/images/textures/dot_brush.png b/res/images/textures/dot_brush.png new file mode 100644 index 0000000..53596ec Binary files /dev/null and b/res/images/textures/dot_brush.png differ diff --git a/res/images/textures/eraser_texture.png b/res/images/textures/eraser_texture.png new file mode 100755 index 0000000..dd76d81 Binary files /dev/null and b/res/images/textures/eraser_texture.png differ diff --git a/res/images/textures/highlighter.png b/res/images/textures/highlighter.png new file mode 100644 index 0000000..5997b64 Binary files /dev/null and b/res/images/textures/highlighter.png differ diff --git a/res/images/textures/soft_brush.png b/res/images/textures/soft_brush.png new file mode 100644 index 0000000..ae862a4 Binary files /dev/null and b/res/images/textures/soft_brush.png differ diff --git a/res/images/textures/spray_brush.png b/res/images/textures/spray_brush.png new file mode 100755 index 0000000..721c91d Binary files /dev/null and b/res/images/textures/spray_brush.png differ diff --git a/res/images/textures/spray_brush2.png b/res/images/textures/spray_brush2.png new file mode 100644 index 0000000..0c7eb68 Binary files /dev/null and b/res/images/textures/spray_brush2.png differ diff --git a/res/target/tv.conf b/res/target/tv.conf new file mode 100644 index 0000000..a6159c8 --- /dev/null +++ b/res/target/tv.conf @@ -0,0 +1,68 @@ +prediction_active = [bool, false] + +stroke_alpha = [float, 1.0, 0.1, 0.0, 1.0] +prec_low = [float, 2.0, 0.1, 0.0, 6.0] +prec_high = [float, 3.0, 0.1, 0.0, 6.0] +factor_divider = [float, 5.0, 10.0, 0.0, 200.0] +kalman_point_distance = [float, 10.0, 0.5, 0.0, 15.0] +kalman_threshold = [float, 9, 0.1, 0.0, 15.0] +initial_covariance = [float, 1.0, 0.1, 0.1, 5.0] +process_noise = [float, 1.0, 0.1, 0.025, 5.0] +measurement_noise = [float, 1.75, 0.25, 0.25, 3.0] +gridSpacing.small.x = [float, 1.0, 0.25, 0.0, 16.0] +gridSpacing.medium.x = [float, 2.0, 0.25, 0.0, 16.0] +gridSpacing.large.x = [float, 4.0, 0.25, 0.0, 16.0] +gridSpacing.small.y = [float, 1.0, 0.25, 0.0, 16.0] +gridSpacing.medium.y = [float, 2.0, 0.25, 0.0, 16.0] +gridSpacing.large.y = [float, 4.0, 0.25, 0.0, 16.0] +gridColorPattern = [char, "#C1C1C1"] +gridThicknessPattern = [char, "1"] +gridBaseThickness = [float, 1.0, 0.25, 0.0, 16.0] + +showDebugInputPoints = [bool, false] +showDebugShapePoints = [bool, false] + +brush_distance = [float, 3.0, 0.25, 0.25, 10.0] + +smoothing_alg = [int, 4, 1, 0, 7] + +hermite_v1 = [float, 0.3, 0.05, 0, 1] +hermite_v2 = [float, 0.2, 0.05, 0, 1] +hermite_v3 = [float, 0.1, 0.05, 0, 1] + +chaikin_iterations = [int, 6, 1, 1, 10] + +legacy_chaikin_iterations = [int, 6, 1, 1, 10] +legacy_chaikin_threshold = [int, 6, 1, 1, 10] + +radial_inner_radius = [float, 4, 0.25, 0, 50] +radial_outer_radius = [float, 6, 0.25, 0, 50] + +#legacy prediction +prediction_error = [float, 1.1, 0.1, 0.0, 10.0] +threshold_1 = [float, 1.0, 0.1, 0.0, 5.0] +threshold_2 = [float, 2.0, 0.1, 0.0, 5.0] +output_points_threshold_1 = [float, 8.0, 1.0, 0.0, 8.0] +output_points_threshold_2 = [float, 4.0, 1.0, 0.0, 4.0] +prediction_timeout = [float, 40.0, 0.25, 0.0, 60.0] +prediction_color_debug = [bool, false] + +#prediction +linear_pred_line_threshold = [float, 1.1, 0.1, 0.0, 5.0] +linear_pred_scaling_factor = [float, 5.0, 0.25, 0.0, 20.0] +linear_pred_acceleration_cap = [float, 2.0, 0.1, 0.0, 10.0] +linear_pred_max_length = [float, 10.0f, 10.0f, 0.0f, 1000.0] + +prediction_model = [char, "model_in_10_out_8_v_1_0_1.tflite"] +prediction_model1 = [char, "model_in_10_out_8_v_1_0_1.tflite"] + +prediction_lin = [bool, false] +prediction_lin_square_prediction = [bool, false] +prediction_tensorflow1 = [bool, false] +prediction_tensorflow2 = [bool, false] + +#varstroke radius calculator +rc_max_distance = [float, 50.0, 5.0, 5.0, 100.0] +rc_min_distance = [float, 1.0, 0.1, 0.0, 4.9] +rc_min_radius = [float, 1.75, 0.05, 1.0, 2.0] +rc_mode = [int, 0, 1, 0, 1] diff --git a/res/target/ubuntu.conf b/res/target/ubuntu.conf new file mode 100644 index 0000000..4f03004 --- /dev/null +++ b/res/target/ubuntu.conf @@ -0,0 +1,68 @@ +prediction_active = [bool, false] + +stroke_alpha = [float, 1.0, 0.1, 0.0, 1.0] +prec_low = [float, 2.0, 0.1, 0.0, 6.0] +prec_high = [float, 3.0, 0.1, 0.0, 6.0] +factor_divider = [float, 5.0, 10.0, 0.0, 200.0] +kalman_point_distance = [float, 10.0, 0.5, 0.0, 15.0] +kalman_threshold = [float, 9, 0.1, 0.0, 15.0] +initial_covariance = [float, 1.0, 0.1, 0.1, 5.0] +process_noise = [float, 1.0, 0.1, 0.025, 5.0] +measurement_noise = [float, 1.75, 0.25, 0.25, 3.0] +gridSpacing.small.x = [float, 1.0, 0.25, 0.0, 16.0] +gridSpacing.medium.x = [float, 2.0, 0.25, 0.0, 16.0] +gridSpacing.large.x = [float, 4.0, 0.25, 0.0, 16.0] +gridSpacing.small.y = [float, 1.0, 0.25, 0.0, 16.0] +gridSpacing.medium.y = [float, 2.0, 0.25, 0.0, 16.0] +gridSpacing.large.y = [float, 4.0, 0.25, 0.0, 16.0] +gridColorPattern = [char, "#C1C1C1"] +gridThicknessPattern = [char, "1"] +gridBaseThickness = [float, 1.0, 0.25, 0.0, 16.0] + +showDebugInputPoints = [bool, false] +showDebugShapePoints = [bool, false] + +brush_distance = [float, 3.0, 0.25, 0.25, 10.0] + +smoothing_alg = [int, 4, 1, 0, 7] + +hermite_v1 = [float, 0.3, 0.05, 0, 1] +hermite_v2 = [float, 0.2, 0.05, 0, 1] +hermite_v3 = [float, 0.1, 0.05, 0, 1] + +chaikin_iterations = [int, 6, 1, 1, 10] + +legacy_chaikin_iterations = [int, 6, 1, 1, 10] +legacy_chaikin_threshold = [int, 6, 1, 1, 10] + +radial_inner_radius = [float, 4, 0.25, 0, 50] +radial_outer_radius = [float, 6, 0.25, 0, 50] + +#legacy prediction +prediction_error = [float, 2.0, 0.1, 0.0, 10.0] +threshold_1 = [float, 1.0, 0.1, 0.0, 5.0] +threshold_2 = [float, 2.0, 0.1, 0.0, 5.0] +output_points_threshold_1 = [float, 8.0, 1.0, 0.0, 8.0] +output_points_threshold_2 = [float, 4.0, 1.0, 0.0, 4.0] +prediction_timeout = [float, 40.0, 0.25, 0.0, 60.0] +prediction_color_debug = [bool, false] + +#prediction +linear_pred_line_threshold = [float, 1.4, 0.1, 0.0, 5.0] +linear_pred_scaling_factor = [float, 1.5, 0.1, 0.0, 6.0] +linear_pred_acceleration_cap = [float, 1.0, 0.1, 0.0, 10.0] +linear_pred_max_length = [float, 50.0f, 10.0f, 0.0f, 1000.0] + +prediction_model = [char, "model_in_10_out_8_v_1_0_1.tflite"] +prediction_model1 = [char, "model_in_10_out_8_v_1_0_1.tflite"] + +prediction_lin = [bool, false] +prediction_lin_square_prediction = [bool, false] +prediction_tensorflow1 = [bool, false] +prediction_tensorflow2 = [bool, false] + +#varstroke radius calculator +rc_max_distance = [float, 50.0, 5.0, 5.0, 100.0] +rc_min_distance = [float, 1.0, 0.1, 0.0, 4.9] +rc_min_radius = [float, 1.75, 0.05, 1.0, 2.0] +rc_mode = [int, 0, 1, 0, 1]