hjfactory / thothcanvas Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Select, Draw
도형(반복)에 다른 도형을 배치해야 한다
자유선 그리기, 도형 그리기, 멘토링, 배경 등의 레이어 구성 가능해야 한다.
마지막으로 작업한 내용 되돌리기
구상
마우스 다운 시 기존 도형 중 지정 해 Selection에 할당?
선택한 도형의 핸들표시는 누가? 1) 도형객체 자체 2) Selection/SelectObj가 표시
다중 선택은? Shift 클릭 시 다중 선택
SelectObject에서 처리? ShapeLayer에서 처리?
Draw 스타일 데이터 관리자
드로윙툴의 툴팔랫트와 같이 지정된 색상과두께의 펜을 사전에 제공하는 기능
CanvasMode에 따라 드른 그리기를 동작해야 한다.
ThItem > ThDrawItem > ThShapeItem > ThRectangleItem
DrawObjectManager(DOMgr: 그리기 객체 관리자)
Pen/Eraser 선택 후 그리기 전 마우스 커서 변경
Custom Circle Cursor
crNone 후 그리기?
ShapeObj에서 구현?
RBLayer? Selection 직접 구현(FMX 버전과 같이)?
사전 정의된 도형을 선택해 캔버스에 추가
DrawItem과 DraoObject의 Draw작업 통합
도형에 연결점(LinkPoint) 설정 후 연결선 핸들 드래그해 연결점과 연결하도록 구현
이슈
MD / MM / MU 이벤트 처리 정리
Canvas > SelObj > Items > Item > Selection 구조
MM
지우개(두께, 모양? 지정 가능)가 지나간 자유선 영역이 지워져야 한다.
기능 캡슐화?가 좋을까?
Microsoft Whiteboard 대비 선의 계단현상이 확연함
다음 문서의 속성들 적용방안 검토할 것
https://graphics32.github.io/Docs/Units/GR32_Polygons/Classes/TPolygon32/_Body.htm
TPolygon32.AntialiasMode
TPolygon32.Antialiased
ThCanvas>ImgView
레이어
아이템
향후 지우개로 객체 지우개 기능에 필요
방안1 - 객체가 Path와 Polygon 정보 보유, Paint 시 Polygon 좌표 변환 해 출력
방안2 - 객체가 Path만 보유, Paint 시 Path 변환 후 Polygon 생성 해 출력
우려/고려 사항
Drawing by scale to canvas
좌표 추가 시 레이어 기준(Viewport) 경로로 기록
그리기 시 Canvas 기준(Local)으로 그리기
CustomLayer 상속 받아 영역 상관없이 그리기 가능할 것으로 예상
Image32(ImgView)는 Bitmap과 Buffer 2개의 그리기 영역을 제공 두개다 Size 지정 필요
계획상 페이지 개념으로 영역을 두는 것이 좋을 것이라 판단해 해당 이슈 보류
자유선 그리그의 경우 Pen과 Eraser 2개이므로 모드에 따라 다른 동작을 수행한다.
Shape의 경우 모양이 한정되지 않으므로 다른 방식 지원이 필요하다.
지정한 라이브러리로 자유선 그리기 시도
글자
도형을 클릭해 놓은 경우 기본 크기로 도형 생성
(GR32_Clipper 이용 시 FloatPoint로 병합 중 오류발생하는 경우 있었음)
폴리곤 병합 시 clipper library 이용 중임.FloatPoint를 IntPoint로 변환해 clipper 처리
가능하다면, 하나의 라이브러리로 통합이 좋음
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.