当前位置: 首页>>代码示例>>C#>>正文


C# ISurfaceHolder.SetFormat方法代码示例

本文整理汇总了C#中ISurfaceHolder.SetFormat方法的典型用法代码示例。如果您正苦于以下问题:C# ISurfaceHolder.SetFormat方法的具体用法?C# ISurfaceHolder.SetFormat怎么用?C# ISurfaceHolder.SetFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISurfaceHolder的用法示例。


在下文中一共展示了ISurfaceHolder.SetFormat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnCreate

		protected override void OnCreate (Bundle savedInstanceState)
		{
			base.OnCreate (savedInstanceState);
			if (!LibsChecker.CheckVitamioLibs (this))
				return;
			SetContentView (Resource.Layout.subtitle1);
			tv = (TextView)FindViewById (Resource.Id.sub1);
			splayer = (SurfaceView)FindViewById (Resource.Id.surface);
			sholder = splayer.Holder;
			sholder.SetFormat (Format.Rgba8888);
			sholder.AddCallback (this);
		}
开发者ID:shaxxx,项目名称:Xamarin.Vitamio,代码行数:12,代码来源:MediaPlayerSubtitle.cs

示例2: OnCreate

		//    *
		//	 * 
		//	 * Called when the activity is first created.
		//	 
		protected override void OnCreate(Bundle icicle)
		{
			base.OnCreate(icicle);
			if (!LibsChecker.CheckVitamioLibs(this))
				return;
			SetContentView(Resource.Layout.mediaplayer_2);
			mPreview =  FindViewById<SurfaceView>(Resource.Id.surface);
			holder = mPreview.Holder;
			holder.AddCallback(this);
			holder.SetFormat(Format.Rgba8888);
			extras = Intent.Extras;

		}
开发者ID:huguodong,项目名称:VitamioBinding-1.0,代码行数:17,代码来源:MediaPlayerDemo_Video.cs

示例3: OnStart

        protected override void OnStart()
        {
            base.OnStart();

            TesseractInit();
			button.Enabled = true;
            _boxPaint.Color = _boxWhite;
            _boxPaint.SetStyle(Android.Graphics.Paint.Style.Stroke);
            _boxPaint.StrokeWidth = 5;
            _backgroundPaint.Color = Android.Graphics.Color.Black;
            _backgroundPaint.Alpha = 255 / 2;
            _backgroundPaint.SetStyle(Android.Graphics.Paint.Style.Fill);
            _backgroundClearPaint.SetXfermode(new Android.Graphics.PorterDuffXfermode(Android.Graphics.PorterDuff.Mode.Clear));
            _resizePaint.Alpha = 255 / 2;
            _resizePaint.Color = _boxWhite;
            _resizePaint.SetStyle(Android.Graphics.Paint.Style.Fill);
            _resizePaint.StrokeWidth = 1;

            _surfaceCamera = (SurfaceView)FindViewById(Resource.Id.surfaceCamera);
            _holderCamera = _surfaceCamera.Holder;
            _holderCamera.AddCallback(this);

            _surfaceBox = (SurfaceView)FindViewById(Resource.Id.surfaceBox);
            _surfaceBox.SetOnTouchListener(this);
            _surfaceBox.SetWillNotDraw(false);
            _holderBox = _surfaceBox.Holder;
            _holderBox.AddCallback(this);
            _holderBox.SetFormat(Android.Graphics.Format.Transparent);
            _surfaceBox.SetZOrderOnTop(true);

            _boxThread = new Thread(new ThreadStart(() =>
            {
                long lastUpdate = 0;
                double fps = 60.0;
                while (_cameraActive)
                {
                    if (System.Environment.TickCount - lastUpdate > 1000 / fps)
                    {
                        lastUpdate = System.Environment.TickCount;
						if (_box != null) {
							DrawBox();
						}
                    }
                }
            }));
            bitmap = Android.Graphics.Bitmap.CreateBitmap(1, 1, Android.Graphics.Bitmap.Config.Argb8888);
			bitmapWithBoxes = Android.Graphics.Bitmap.CreateBitmap(1, 1, Android.Graphics.Bitmap.Config.Argb8888);
			for (int i = 0; i < threshholds.Length; i++)
            {
                threshholds[i] = 10 + i * 2;
            }
            _cameraActive = true;
            _toast = Toast.MakeText(this, "", ToastLength.Short);
            _processDialog = new Android.App.ProgressDialog(this);
            _processDialog.Indeterminate = true;
            _processDialog.SetProgressStyle(Android.App.ProgressDialogStyle.Spinner);
            _processDialog.SetTitle("Please wait");
            _processDialog.SetMessage("Please wait...");
            _processDialog.SetCancelable(true);
        }
开发者ID:SansSkill,项目名称:Introproject,代码行数:60,代码来源:CameraActivity.cs


注:本文中的ISurfaceHolder.SetFormat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。