File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
render/canvas2d/entityRenderer
stage/stageManager/concreteMethods Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,14 @@ export namespace EntityRenderer {
9393 export function renderAllEntities ( viewRectangle : Rectangle ) {
9494 let renderedNodes = 0 ;
9595
96- // 2 遍历所有非section实体
96+ // 2 遍历所有非section实体 / 非涂鸦实体
9797 for ( const entity of StageManager . getEntities ( ) ) {
9898 if ( entity instanceof Section ) {
9999 continue ;
100100 }
101+ if ( entity instanceof PenStroke ) {
102+ continue ;
103+ }
101104 // 视线之外不画
102105 if ( Renderer . isOverView ( viewRectangle , entity ) ) {
103106 continue ;
@@ -112,6 +115,13 @@ export namespace EntityRenderer {
112115 }
113116 SectionRenderer . render ( section ) ;
114117 }
118+ // 4 遍历所有涂鸦实体
119+ for ( const penStroke of StageManager . getPenStrokes ( ) ) {
120+ if ( Renderer . isOverView ( viewRectangle , penStroke ) ) {
121+ continue ;
122+ }
123+ EntityRenderer . renderEntity ( penStroke ) ;
124+ }
115125 return renderedNodes ;
116126 }
117127
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ export namespace StageObjectColorManager {
1717 node . color = color ;
1818 }
1919 }
20+ for ( const entity of StageManager . getPenStrokes ( ) ) {
21+ if ( entity . isSelected ) {
22+ // TODO: 涂鸦应该可以改颜色
23+ }
24+ }
2025 }
2126
2227 export function clearEntityColor ( ) {
You can’t perform that action at this time.
0 commit comments