0

蛍光ペンを使用してWindowsPhone8で描画する方法は、背景のコンテキストが表示される理由です。描画アプリを作成していますが、これについて誰かが考えている場合は、この点で立ち往生しています。ヒントを教えてください。よろしくお願いします。

4

2 に答える 2

1

void Touch_FrameReported(object sender、TouchFrameEventArgs e){try {int pointsNumber = e.GetTouchPoints(drawCanvas).Count; TouchPointCollection pointCollection = e.GetTouchPoints(drawCanvas);

            for (int i = 0; i < pointsNumber; i++)
            {
                if (pointCollection[i].Action == TouchAction.Down)
                {
                    preXArray[i] = pointCollection[i].Position.X;
                    preYArray[i] = pointCollection[i].Position.Y;
                }
                if (pointCollection[i].Action == TouchAction.Move)
                {
                    line = new Line();

                    line.X1 = preXArray[i];
                    line.Y1 = preYArray[i];
                    line.X2 = pointCollection[i].Position.X;
                    line.Y2 = pointCollection[i].Position.Y;

                    line.Stroke = new SolidColorBrush(System.Windows.Media.Color.FromArgb(50,84,255,159));

                   // line.Stroke = new SolidColorBrush(Colors.Red);
                   // line.StrokeThickness = 100.0;
                    line.StrokeThickness = 20;


                  //  line.Height = 10;

                    SolidColorBrush scb = new SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 29, 177, 0));
                    //postconstruction technique



                    line.Fill = new SolidColorBrush(Colors.Red);


                    drawCanvas.Children.Add(line);

                    preXArray[i] = pointCollection[i].Position.X;
                    preYArray[i] = pointCollection[i].Position.Y;

                    lastObject = i;
                    // drawCanvas.Children.RemoveAt(1);

                }
            }
        }

        catch (Exception er)
        {
            MessageBox.Show(er.Message);
        }
    }
于 2013-02-11T09:10:09.260 に答える
1

画面上の描画については、InkPresenterの使用を検討する必要があります。これは、これらのユースケースを処理するのに適しているためです@ http://www.nickharris.net/2010/03/silverlight-for-mobile-on-windows-phone-7-inkpresenter-fun/

于 2013-02-12T01:30:05.837 に答える