Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NUI] PenWave #6522

Closed
wants to merge 37 commits into from
Closed

[NUI] PenWave #6522

wants to merge 37 commits into from

Conversation

JoogabYun
Copy link
Contributor

Description of Change

https://confluence.sec.samsung.net/display/GFX/PenWave+Sharp

API Changes

  • ACR:

PenWaveSharp의 목적

  • 첫번째 목적은 HandDrawingEngne(PenWave)의 기능을 바인딩 하여 앱 개발자가 PenWave기능을 사용할 수 있게 하는 것 입니다.
    • 이를 위해 모든 PenWave의 기능을 바인딩하여 제공합니다.
  • 두번째 목적은 PenWave의 기능을 좀 더 쉽게 사용할 수 있게 기능을 제공하는 것 입니다.
    • PenWaveCanvas를 생성만 해도 기본적인 기능을 디폴트로 제공하는 것 입니다.
    • 다양한 tool들에 대해 이미 구현되어 있고 이를 사용자가 그대로 사용할 수 있습니다.
    • 기본적인 UI를 제공하여 사용자가 해당 UI를 이용해 동작을 할 수 있습니다.
    • 여기선 PenWaveToolPicker를 제공하고 있습니다.

PenWaveCanvas의 개요

  • 두번째 목적인 PenWave엔진의 기능을 좀 더 쉽게 사용하기 위해 PenWaveCanvas를 제공합니다.
  • PenWaveCanvas는Tizen.NUI 기반의 드로잉 Component입니다. PenWaveCanvas는 사용자가 다양한 도구를 사용해 드로잉, 지우기, 선택, 캔버스 조작 등을 할 수 있도록 설계되었습니다.

PenWaveCanvas의 주요 구성 요소

  • PenWaveCanvas
    • 핵심 컴포넌트로 드로잉 캔버스를 관리합니다.
    • 주요역할
      • 캔버스 초기화
      • 캔버스 렌더링(CanvasRenderer와 연결, CanvasRenderer는 실제 PenWave의 엔진과 연결되어 동작에 대해 관여하고 PenWaveCanvas는 화면 구성에만 관여합니다.)
      • 도구 설정 및 동작 처리
      • 캔버스 조작 (clear, undo/redo, backgroundColor, grid, screenshot, save/load 등)
    • ToolBase 및 하위 클래스
      • PenWave에서 사용할 수 있는 다양한 도구는 ToolBase를 기반으로 구현됩니다.
      • 공통 구조 (ToolBase)
        • 모든 Tool은 Activate(), Deactivate(), HandleInput() 메서드를 통해 동작합니다.
        • 작업 시작/완료 이벤트를 지원합니다.
      • 도구 종류
        • PencilTool
          • 펜 도구로 브러쉬 타입, 색상, 크기 설정 가능
          • 다양한 브러쉬 타입을 지원 (예 : Stroke, Highlighter, SoftBrush 등)
        • EraserTool
          • 지우개 도구로 크기와 지우는 방식 (partial, full)선택 가능
        • SelectionTool
          • 선택 도구로 객체를 선택하여 이동, 확대, 회전, 복사, 잘라내기, 붙여넣기 동작 가능
        • RulerTool
          • 자, 각도기 도구로 사각형, 원 그리기, 직선자, 각도기의 동작을 수행합니다.
    • PenWaveToolPicker
      • PenWave의 UI구성 요소로 사용자가 도구를 직관적으로 선택하고 설정할 수 있도록 기본 UI를 지원합니다.
      • 주요역할
        • 현재 캔버스와 연결하여 도구를 관리합니다.
        • 각 tool 및 캔버스 동작 등을 UI를 통해 사용자에게 제공합니다.
      • 주요 기능
        • 도구를 선택하고 설정 변경을 반영합니다.
    • UnRedoManager
      • PenWaveToolPicker에서 Undo/Redo 여부를 알 수 있도록 스택을 관리합니다.

PenWaveCanvas 주요 동작 흐름

  • 캔버스 초기화
    • PenWaveCanvas 생성시 CanvasRenderer와 연결합니다.
    • 사용되는 도구를 연결합니다.
  • 사용자가 도구를 선택
    • PenWaveToolPicker를 통해 도구를 선택할 수 있습니다. 이 경우 도구의 속성을 UI에서 설정 가능합니다. (브러쉬 타입, 색상, 크기 등)
    • 직접 Tool을 생성하여 PenWaveCanvas에 설정할 수 있습니다.
  • 사용자 입력 처리
    • 사용자의 터치 입력은 HandleInput()을 통해 전달합니다.
    • 현재 활성화된 도구가 입력을 받아 처리합니다. (예 : 펜 드로잉, 지우기 등)

@JoogabYun JoogabYun marked this pull request as ready for review December 18, 2024 01:11
@TizenAPI-Bot
Copy link
Collaborator

Internal API Changed

Added: 252, Removed: 0, Changed: 0

@TizenAPI-Bot
Copy link
Collaborator

Internal API Changed

Added: 252, Removed: 0, Changed: 0

@TizenAPI-Bot
Copy link
Collaborator

Internal API Changed

Added: 252, Removed: 0, Changed: 0

@TizenAPI-Bot
Copy link
Collaborator

Internal API Changed

Added: 256, Removed: 0, Changed: 0

@TizenAPI-Bot
Copy link
Collaborator

Internal API Changed

Added: 257, Removed: 0, Changed: 0

@TizenAPI-Bot
Copy link
Collaborator

Internal API Changed

Added: 255, Removed: 0, Changed: 0

@TizenAPI-Bot
Copy link
Collaborator

Internal API Changed

Added: 255, Removed: 0, Changed: 0

@TizenAPI-Bot
Copy link
Collaborator

Internal API Changed

Added: 255, Removed: 0, Changed: 0

upple and others added 13 commits December 19, 2024 19:27
…allback

Let we keep Idler callback list as membery of internal Application class,
and allow to remove them during idler callback execute.

Signed-off-by: Eunki, Hong <[email protected]>
…ImageUrl

Since ImageUrl's reference should be hold on image visual, we should generate
image visual synchronously, not on Processor time.

+

Minor code clean up applied

Signed-off-by: Eunki, Hong <[email protected]>
* Do not convert Vector4 to Color when initializing static colors
  * Eventually, static colors should be created by r, g, b values by c# code, not getting from DALi
* Preload static colors

Signed-off-by: Jiyun Yang <[email protected]>
…tidl (Samsung#6536)

* Add new methods to support new types in tidl

Signed-off-by: pjh9216 <[email protected]>

* Add attributes for internal APIs

Signed-off-by: pjh9216 <[email protected]>

* Use sizeof operator

Signed-off-by: pjh9216 <[email protected]>

---------

Signed-off-by: pjh9216 <[email protected]>
ControlState was implemented inefficently on the memory and the performance.
This patch purposed to reduce inefficency by using bitflags on the state instead of string list.
[https://github.sec.samsung.net/NUI/OneUIComponents/issues/15]

long type bitmask will be represent each states,
1 1 1 1 1
O S D P F

Normal   : 0L
Focused  : 1L
Pressed  : 2L
Disabled : 4L
Selected : 8L
Other    : 16L
and All  : 31L

This concept is based on VisualState of NUI2,
https://github.sec.samsung.net/dotnet/nui2/blob/main/src/Tizen.NUI2.Components/Base/ViewState.cs
but we had to modified few states to keep backward compatibility of NUI
ControlState.
Reorganized entire project structure for improved clarity and maintainability.
Introduced customizable interfaces for AI functionalities, allowing seamless integration of third-party modules.
Optimized existing code base for increased efficiency and reduced redundancy.

Co-authored-by: Angler <[email protected]>
Since transform data is kind of renderer property internally,
we don't need to re-create them.

Let we use UpdateProperty action for this case.

Signed-off-by: Eunki, Hong <[email protected]>
- We MUST call ReleaseBuffer after call AcquireBuffer
- We MUST call AcquireBUffer before call ReleaseBuffer

If not, exception or deadlock will occured.

Signed-off-by: Eunki, Hong <[email protected]>
@dongsug-song
Copy link
Contributor

@rabbitfor 님, @jaehyun0cho 님, @everLEEst 님, @lwc0917 님,
패치가 큽니다. 같이 리뷰 부탁드립니다.

everLEEst and others added 18 commits January 14, 2025 15:52
NUI Language version upgrade for 9.
Let we add 'using' mark for temerally used `PropertyValue`.

Optimize PropertyMap.Add() API if it is prepared.

It is knd of next-step. So current PR could be keep going on

Signed-off-by: Eunki, Hong <[email protected]>
PivotPoint, AnchorPoint, Position
This also includes PropertyMap optimizations to prevent value type being conveted to reference type again.

Signed-off-by: Jiyun Yang <[email protected]>
(1) Introduce the value type of ControlState. It replaces ControlState implementation.
(2) Notify IsEnabled changed to control state outside of view.

Signed-off-by: Jiyun Yang <[email protected]>
PenWave: Binds the drawing engine’s API.

PenWaveCanvas: Provides a Canvas using a drawing engine, allowing users to easily use drawing functions.

https://confluence.sec.samsung.net/display/GFX/PenWave+Sharp
@JoogabYun
Copy link
Contributor Author

JoogabYun commented Jan 14, 2025

패치가 꼬여서
#6577
로 다시 올렸습니다. 이 PR은 close합니다.

@JoogabYun JoogabYun closed this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.