Beispiel #1
0
        void SwitchVertical()
        {
            CamUtils.SetVertical();

            if (btnSnap != null)
            {
                RelativeLayout.LayoutParams LParams = (RelativeLayout.LayoutParams)btnSnap.LayoutParameters;
                LParams.RemoveRule(LayoutRules.AlignParentRight);
                LParams.RemoveRule(LayoutRules.CenterVertical);

                LParams.AddRule(LayoutRules.AlignParentBottom);
                LParams.AddRule(LayoutRules.CenterHorizontal);
            }
        }
Beispiel #2
0
        public void OnPictureTaken(byte[] Data, Camera Cam)
        {
            CamUtils.StopPreview();

            Utils.NewThread(() => {
                IEditableImage Img = CrossImageEdit.Current.CreateImage(Data);
                CamUtils.StartPreview();

                if (CamUtils.GetOrientation() != 0)
                {
                    Img = Img.Rotate(90);
                }

                OnPicture(Img).Wait();
            });
        }
Beispiel #3
0
 public bool OnSurfaceTextureDestroyed(SurfaceTexture surface)
 {
     CamUtils.Stop();
     return(true);
 }
Beispiel #4
0
 public void OnSurfaceTextureAvailable(SurfaceTexture Surface, int Width, int Height)
 {
     CamUtils.Start(Surface, Width, Height);
 }
Beispiel #5
0
 private void OnSnap(object sender, EventArgs e)
 {
     ShowLabel("Snapping...");
     CamUtils.TakePicture(OnPicture);
 }