프로젝트

일반

사용자정보

개정판 22b925fe

ID22b925fefdec3e2ce7b79af382e7a307d5d512c7
상위 e46ef756
하위 d5c34b1d

김태성이(가) 5달 전에 추가함

issue #0000 SymbolPrompt.xaml의 png OR svg select 제거

Change-Id: I2aed8d2881811410931c3c2ed2ab3ca5c15a0502

차이점 보기:

KCOM/Controls/SignManager.xaml.cs
207 207
        }
208 208

  
209 209
        public StrokeCollection ConvertImageToStrokeCollection(BitmapImage image)
210
        {
210
        {  
211
            // 이미지 크기 조정
212
            int maxWidth = 900;
213
            int maxHeight = 200;
214
            double scaleX = (double)maxWidth / image.PixelWidth;
215
            double scaleY = (double)maxHeight / image.PixelHeight;
216
            double scale = Math.Min(scaleX, scaleY);
217

  
218
            TransformedBitmap resizedImage = new TransformedBitmap(image, new ScaleTransform(scale, scale));
219

  
211 220
            InkCanvas inkCanvas = new InkCanvas();
212
            inkCanvas.Width = image.Width;
213
            inkCanvas.Height = image.Height;
221
            inkCanvas.Width = resizedImage.Width;
222
            inkCanvas.Height = resizedImage.Height;
214 223

  
215 224
            // WriteableBitmap 생성
216
            WriteableBitmap writeableBitmap = new WriteableBitmap(image);
225
            WriteableBitmap writeableBitmap = new WriteableBitmap(resizedImage);
217 226

  
218 227
            // 픽셀 데이터를 저장할 배열 생성
219 228
            int stride = writeableBitmap.PixelWidth * (writeableBitmap.Format.BitsPerPixel / 8);
......
241 250
                        points.Add(new StylusPoint(x, y));
242 251
                        Stroke stroke = new Stroke(points);
243 252
                        inkCanvas.Strokes.Add(stroke);
253

  
254
                        System.Threading.Thread.SpinWait(10);
244 255
                    }
245 256
                }
246 257
            }

내보내기 Unified diff

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