VMR9 aspect ratio mode - directshow

I want to disable the letter-boxing of a VMR9 with three input streams. The aspect ratio mode was correctly set to VMR_ARMODE_NONE with function IVMRWindowlessControl9::SetAspectRatioMode. But I can't get the VMR9 to give up letter-boxing. The black bars are always shown.
Does anybody now what could be the reason for this behavior?
BTW: With IVMRAspectRatioControl9::SetAspectRatioMode I can't disable the black bars too.

Related

Using data line widths in bokeh

Is there a way to provide line width in bokeh in data space, or alternatively can the line width be fixed in a way that zooming does not alter it?
I am trying to draw lines right next to one another without clashes or gaps between them.
Currently, I am using a mapping from line width to coordinate width and change the line widths and line coords in sync to achieve this, but as soon as I zoom the line width is adapted.
Is there a way to provide line width in bokeh in data space
No, but feature requests are welcome!
can the line width be fixed in a way that zooming does not alter it?
Line width is set in screen units - zooming does not alter it by default.
It seems like the problem is that you change your line width in response to the range changes, and zooming does change ranges.

Set ggsave() aspect ratio to the ratio that RStudio's "Zoom" button gives?

I am using ggsave() to save plots from ggplot().
In R-Studio, clicking the "Zoom" button automatically resizes most of my plots to have quite aesthetic proportions, whereas when I try to manually specify the size and aspect ratios, I get plots that don't look as nice.
Is there a way that I can make ggsave use the same aspect ratio or size that R-Studio's "Zoom" button does?
Or how do I call the Zoom button using code?
If you right click on the zoomed image and select 'Inspect element', you'll see the aspect ratio there. That can then be passed into ggsave. Note that I'm assuming the aspect ratio selected by R Studio's zoom is constant on a given monitor in which case you would only need to find the aspect ratio once.
Here's an example of where to find it.

How can I set the backgroundColor of a WKInterfaceController programmatically?

I couldn't find any way of changing the overall background color of the Watch app interface programmatically.
I therefore tried creating a fullscreen WKInterfaceGroup and changing the backgroundColor of that.
centralGroup.setBackgroundColor(UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0))
However, I still have unfilled rounded corners and lines on borders.
Is there any way to achieve my goal, of an edge-to-edge background color that fills the screen?
While you can set a background color for a WKInterfaceController in the storyboard, there is no API that lets you programmatically set it in the present Xcode 6.2 beta 3.
However, you can create a full screen WKInterfaceGroup and set the color of that programmatically. If you also setCornerRadius: to 0 you get the following result:
Clearly, there are still black lines at the edges here. The other possibility was that setting a solid color image as the background might perhaps scale to fill the full screen with one of the scaling options, but I tested this and the result is identical to the above.
However, it is important to consider the hardware this will be running on. Apple have said more than once in their public statements about the Watch that the intersection between the laminated screen and the edges is so seamless that you essentially can't tell where the screen ends and the edges begin. Taking this at face value, as long as you set the background color of the WKInterfaceController to clear or black in interface builder, so that these edges are black to match the screen surround, then these black lines should be invisible to the end user and are something you can safely ignore.
This is how I done it:
Add WKInterfaceGroup and setCornerRadius to 0
Go to WKInterfaceController Attribute Inspector and change Left/Right insets to 0 (Fig.1) (This will remove the extra black line on the left & right side)
Change the color of the WKInterfaceGroup to whatever you want :)
Fig.1
Change insets of Your WKInterfaceController to custom and set all to 0. Also, change corner radius of group to 0 too. Enjoy.
Try changing the corner radius of the WKInterfaceGroup to 0. You can use setCornerRadius: to change the corner radius.

How to use size classes in xcode6

Please, is there someone who can help me to understand ho to use Size Classes in Xcode6? I'm designing for the first time a dialer. I set up different constraints, and I have no error message, and in all screens (Iphone3-4-6-6+) I have good aligned keys, but I see keys in the same size in all screen (that's not good for me, because I need they are bigger in Iphone6 and 6+). How can I do to see the right size and the right position of an object, like the key, in this case? I checked the boxes in the right panel "Use size classes" and "use autolayout", and I understood that I have to work in different optional screens that I can select in the bottom of the work area (any-any, compact-any, etc..) but I didn't understand what to do after choising a screen (example compact-any).
Hi as per your question what you need to do when you have Any-Any size class give the constraints which you need to be common for all the views(in your case keys).
e.g. : If you want your view to remain so same height and width you need to set those constraints in Any-Any and in when you change to Custom-Any size class you just need to give constraints related to leading and trailing.
In Any-Any you just need to give widths Equally,aspect ratio and horizontal and vertical spacing between views.
The constraints highlighted in the below image are set in Any-Any Size class.
This constraints are only applied all iphones and iPad in both portrait and landscape mode.
In Compact-Any you just need to set leading,trailing,top and bottom spacing to views from superview or layout margin.
The constraints selected in the below image are set in Custom-Any Size class.
This constraints are only applied to all iphones in portrait and landscape mode and are not applied to iPad.
Result
Here i've not applied bottom constraints to views.
but you can set if you have more controls.
Please refer the answer i've given for multiple controls with auto layout using size class.
https://stackoverflow.com/a/27471120/4101371
You can refer below links it has good explanation on auto layout using size class.
http://mathewsanders.com/designing-adaptive-layouts-for-iphone-6-plus/
http://mobileoop.com/how-to-use-auto-layout-in-xcode-6-for-ios-7-and-8-development
Hope it will be helpful in solving your issue.

How to make grids covered by figures?

I am new to RRDtool. I generated a graph with grid(--grid-dash 1:0), a LINE(LINE1:rt#4e9a06) and I also have the area between the line and the x-axis coloured (AREA:rt#4e9a06 ). I notice the grid still shows up in the colored-area. I am wondering if there is any way to cover the grid with the colored-area.
Also, I am also wondering if there is any good-looking rrdtool samples/examples available online? Thanks.
I have no way of testing this currently, but here's what the documentation says (emphasis mine) :
[-c|--color COLORTAG#rrggbb[aa]]
Override the default colors for the standard elements of the graph.
The COLORTAG is one of BACK background, CANVAS for the background of
the actual graph, SHADEA for the left and top border, SHADEB for the
right and bottom border, GRID, MGRID for the major grid, FONT for the
color of the font, AXIS for the axis of the graph, FRAME for the line
around the color spots, and finally ARROW for the arrow head pointing
up and forward. Each color is composed out of three hexadecimal
numbers specifying its rgb color component (00 is off, FF is maximum)
of red, green and blue. Optionally you may add another hexadecimal
number specifying the transparency (FF is solid). You may set this
option several times to alter multiple defaults.
What about making an almost transparent grid with arguments like these (note the extra 7F parameter which translates to 127 in decimal):
-c MGRID#<hex triplet>7F -c GRID#<hex triplet>7F
It should still be visible in the background but be invisible (or barely noticeable) once any graph covers it.
Note that this answer from the developer of RRDTool says that the grid is always painted after the graph, so in the end you'll always have it in the foreground, your only solution is to either totally disable it or tinker with color/transparency parameters to make it invisible when covered by the graphed data.

Resources