Ejemplo n.º 1
0
        public void ReadImageFromFile()//加载照片
        {
            var bl = SilverlightLFC.common.Environment.getEnvironment().OpenImage();

            if (bl == null || bl.Result == null || bl.Result.Count == 0)
            {
                return;
            }
            var v = bl.Result.FirstOrDefault();

            if (v == null)
            {
                return;
            }
            //PhotoLayers.Children.Clear();
            if (SelectLayer == null)
            {
                PhotoLayer pl = new PhotoLayer();
                PhotoLayers.Children.Add(pl);
                SelectLayer = pl;
                //return;
            }

            SelectLayer.setPhoto(WriteableBitmapHelper.Clone(v), ScalePercent);
            setClip();
            //SelectLayer.setScale(ScalePercent);
        }
Ejemplo n.º 2
0
 public void Paste()//粘贴
 {
     //CameraTestDesktop d = CameraTestDesktop.getDesktop();
     //PhotoLayer pl = new PhotoLayer();
     //pl.Photo.Source = PhotoEditManager.Paste();
     if (SelectLayer == null)
     {
         return;
     }
     SelectLayer.setPhoto(PhotoEditManager.Paste(), ScalePercent);
 }