Ejemplo n.º 1
0
        public async void MergineSelect()//合并选择区编辑的结果,实际是sImg和底层的拼合
        {
            Layer.Children.Remove(canvasTempObject);

            //Layer.Children.Remove(Photo);

            WriteableBitmap mb = await WriteableBitmapHelper.Snapshot(Layer);

            //canvasSelect.Children.Clear();
            Photo.Source = mb;
            _Photo       = mb;
            sImg.Source  = null;
            Layer.Children.Remove(sImg);
            Layer.Children.Remove(canvasTempObject);
        }
Ejemplo n.º 2
0
        public async Task <WriteableBitmap> getImage()//得到一个最终拼合图层的位图
        {
            ScaleTransform st = new ScaleTransform();

            st.ScaleX = 1 / ScalePercent;
            st.ScaleY = 1 / ScalePercent;
            DCTestLibrary.PhotoTest pt = new DCTestLibrary.PhotoTest();
            var tp = PhotoLayers.RenderTransform as TransformGroup;

            if (tp != null)
            {
                tp.Children.Add(st);
            }
            WriteableBitmap b = await WriteableBitmapHelper.Snapshot(PhotoLayers);

            //WriteableBitmap b = new WriteableBitmap(PhotoLayers, null);
            return(b);
        }