프로젝트

일반

사용자정보

개정판 29cf2c0c

ID29cf2c0c5cc366f9fe94dd960abeb3bc5f29e47e
상위 e6a9ddaf
하위 38a9cd48

백흠경이(가) 5년 이상 전에 추가함

issue #923: fixed InkControl drawing

Change-Id: If9dd3c5a6c2ceec99dd4d4f897439eb1791c4d63

차이점 보기:

KCOM/Views/MainMenu.xaml.cs
1280 1280
                Point currentCanvasZoomPanningMouseMovePoint = e.GetPosition(zoomAndPanCanvas);
1281 1281
                SetCursor();
1282 1282

  
1283
                if (IsDrawing)
1284
                {
1285
                    if (currentControl == null)
1286
                    {
1287
                        switch (controlType)
1288
                        {
1289
                            case ControlType.PenControl:
1290
                                {
1291
                                    if (inkBoard.Tag.ToString() == "Ink")
1292
                                    {
1293
                                        stroke.StylusPoints.Add(new StylusPoint(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y));
1294
                                    }
1295
                                    else if (inkBoard.Tag.ToString() == "EraseByPoint")
1296
                                    {
1297
                                        RemovePointStroke(currentCanvasDrawingMouseMovePoint);
1298
                                    }
1299
                                    else if (inkBoard.Tag.ToString() == "EraseByStroke")
1300
                                    {
1301
                                        RemoveLineStroke(currentCanvasDrawingMouseMovePoint);
1302
                                    }
1303

  
1304
                                    //inkBoard.Strokes.Add(stroke);
1305
                                }
1306
                                break;
1307
                        }
1308
                        return;
1309
                    }
1310
                }
1311

  
1312 1283
                if (currentControl != null)
1313 1284
                {
1314 1285
                    double moveX = currentCanvasDrawingMouseMovePoint.X - canvasDrawingMouseDownPoint.X;
......
2436 2407
                    }
2437 2408
                }
2438 2409
            }
2410
            else if(mouseHandlingMode == MouseHandlingMode.Drawing && e.LeftButton == MouseButtonState.Pressed)
2411
            {
2412
                Point currentCanvasDrawingMouseMovePoint = e.GetPosition(drawingRotateCanvas);
2413
                Point currentCanvasZoomPanningMouseMovePoint = e.GetPosition(zoomAndPanCanvas);
2414
                SetCursor();
2415
                if (currentControl == null)
2416
                {
2417
                    switch (controlType)
2418
                    {
2419
                        case ControlType.PenControl:
2420
                            {
2421
                                if (inkBoard.Tag.ToString() == "Ink")
2422
                                {
2423
                                    stroke.StylusPoints.Add(new StylusPoint(currentCanvasDrawingMouseMovePoint.X, currentCanvasDrawingMouseMovePoint.Y));
2424
                                }
2425
                                else if (inkBoard.Tag.ToString() == "EraseByPoint")
2426
                                {
2427
                                    RemovePointStroke(currentCanvasDrawingMouseMovePoint);
2428
                                }
2429
                                else if (inkBoard.Tag.ToString() == "EraseByStroke")
2430
                                {
2431
                                    RemoveLineStroke(currentCanvasDrawingMouseMovePoint);
2432
                                }
2433

  
2434
                                //inkBoard.Strokes.Add(stroke);
2435
                            }
2436
                            break;
2437
                    }
2438
                    return;
2439
                }
2440
            }
2439 2441
            else if (((e.LeftButton == MouseButtonState.Pressed) && mouseHandlingMode == MouseHandlingMode.Selecting) || 
2440 2442
                ((e.LeftButton == MouseButtonState.Pressed) && mouseHandlingMode == MouseHandlingMode.Capture) || 
2441 2443
                ((e.LeftButton == MouseButtonState.Pressed) && mouseHandlingMode == MouseHandlingMode.DragZoom))

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)