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); } }
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(); }); }
public bool OnSurfaceTextureDestroyed(SurfaceTexture surface) { CamUtils.Stop(); return(true); }
public void OnSurfaceTextureAvailable(SurfaceTexture Surface, int Width, int Height) { CamUtils.Start(Surface, Width, Height); }
private void OnSnap(object sender, EventArgs e) { ShowLabel("Snapping..."); CamUtils.TakePicture(OnPicture); }