- Sort Posts
- 5 replies
- Last post
Re: Re sizing QCARSampleGLView
November 13, 2011 - 11:15pm #4
Hi Kim,
Thanks for your reply. I have changed the camera surface size by giving the height and width in the addContentView. Code :-
addContentView(mGlView, new LayoutParams(
200,
300));
Now, i want to put this frame in the center of the screen.
Please help me.
Thanks
Rahul
Re: Re sizing QCARSampleGLView
November 14, 2011 - 7:03pm #3
Re: Re sizing QCARSampleGLView
November 15, 2011 - 5:50am #2
Re: Re sizing QCARSampleGLView
November 15, 2011 - 10:01am #1
This isn't a use case we test, but if you change the size and position of the view you'll need to update the configureVideoBackground method in native (e.g. ImageTargets.cpp). You can set the size and position of the VideoBackgroundConfig structure to match your new drawing rectangle. Note that this method currently sets the size to something larger than the screen in most cases, as the camera image typically has a different aspect ratio than the screen. You'll want to keep the camera aspect ratio intact, it's defined by videoMode width and height.
- Kim