scale

Improve the quality of texture sample in Direct3D

房东的猫 提交于 2020-01-06 08:43:38
问题 I'm using directx 11 to render video.I create a Texture2D and copy rgba video data into it.Also it is the resource of pixel shader.Here is code: void CreateTexture(int nWidth, int nHeight) { D3D11_TEXTURE2D_DESC textureDesc; textureDesc.Width = nWidth;//Video width textureDesc.Height = nHeight;//Video height textureDesc.MipLevels = 1; textureDesc.ArraySize = 1; textureDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; textureDesc.SampleDesc.Count = 1; textureDesc.Usage = D3D11_USAGE_DYNAMIC;

RecyclerView doesn't scale with its item

…衆ロ難τιáo~ 提交于 2020-01-06 08:24:19
问题 Here's github rep example of the issue and the RecyclerView adapter for your convenience. I am scaling RecyclerView item on click imageView.setOnClickListener { val pivotType = Animation.RELATIVE_TO_SELF val scaleAnime = ScaleAnimation(1f,2f,1f,2f, pivotType, 0.5f, pivotType, 0.5f ) scaleAnime.duration = 400 scaleAnime.fillAfter = true ViewCompat.setElevation(it,1f) it.startAnimation(scaleAnime) } However, I'm struggling with the following issues: The RecyclerView itself doesn't react to the

calculate mp3 average volume

好久不见. 提交于 2020-01-05 12:16:47
问题 I need to know the average volume of an mp3 file so that when I convert it to mp3 (at a different bitrate) I can scale the volume too, to normalize it... Therefore I need a command line tool / ruby library that gives me the average volume in dB. 回答1: You can use sox (an open source command line audio tool http://sox.sourceforge.net/sox.html) to normalize and transcode your files at the same time. EDIT Looks like it doesn't have options for bit-rate. Anyway, sox is probably overkill if LAME

Inversed logarithmic scale in gnuplot

大兔子大兔子 提交于 2020-01-05 08:27:07
问题 When plotting data which are very dense in small ranges of y, the logarithmic scale of gnuplot is the right scale to use. But what scale to use when the opposite is the case? let's say most y values of different curves are between 90 and 100. In this case I want to use something like a inversed logarithmic scale. I tried a log scale between 0 and 1 but gnuplot wants me to choose a scale greater than 1 How can I achieve this? 回答1: You are right, you can use the inverse of the logarithmic

Scale date axis of XYPlot to a fixed interval

有些话、适合烂在心里 提交于 2020-01-05 05:29:14
问题 In Java project, I used JFreeChart 1.0.19 version and XYPlot to draw lines on plot. I want scale xAxis (Date axis) as date in example - 10:00:05, 10:00:05, 10:00:10, 10:00:15…—scaling for every 5 seconds. But now when user start with 10:00:03 time, it looks as 10:00:03, 10:00:08, 10:00:13, 10:00:18… I want that always be scaled of 5 seconds as 10:00:05, 10:00:05, 10:00:10, 10:00:15 and be independently of start time, how to set it? I configurated domain axis(time axis) as below: domainAxis

Auto-Scale Y-Axis in JfreeChart

廉价感情. 提交于 2020-01-03 08:43:22
问题 I am using JFreeChart to create candlestick charts in my Java app. However, my charts end up looking like this: http://imageshack.us/photo/my-images/69/capturebhx.png/ I would like to have the Y-axis automatically scaled so that the chart looks more like this: http://imageshack.us/photo/my-images/717/capture2wl.png/ I think org.jfree.chart.axis.NumberAxis.configure() will do this, but I'm not sure. I can't seem to find a way to tie my JFreeChart object, or ChartPanel object to this NumberAxis

Auto-Scale Y-Axis in JfreeChart

大城市里の小女人 提交于 2020-01-03 08:41:18
问题 I am using JFreeChart to create candlestick charts in my Java app. However, my charts end up looking like this: http://imageshack.us/photo/my-images/69/capturebhx.png/ I would like to have the Y-axis automatically scaled so that the chart looks more like this: http://imageshack.us/photo/my-images/717/capture2wl.png/ I think org.jfree.chart.axis.NumberAxis.configure() will do this, but I'm not sure. I can't seem to find a way to tie my JFreeChart object, or ChartPanel object to this NumberAxis

How to make buttons automatically scale down, when screen size decrease?

回眸只為那壹抹淺笑 提交于 2020-01-03 05:32:24
问题 Hi I've been tryin to figure this out but I can't. I have this button <Button android:layout_alignLeft="@+id/button1" android:layout_below="@+id/button2" android:id="@+id/button3" android:layout_width="235dp" android:text="@string/spire" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" > When this button appears on smaller screen how can i make it the button also scale own smaller? Thanks! EDIT: Okay so heres the new code. But I'm unsure of how to make the edit

How to make buttons automatically scale down, when screen size decrease?

拈花ヽ惹草 提交于 2020-01-03 05:32:10
问题 Hi I've been tryin to figure this out but I can't. I have this button <Button android:layout_alignLeft="@+id/button1" android:layout_below="@+id/button2" android:id="@+id/button3" android:layout_width="235dp" android:text="@string/spire" android:layout_gravity="center_horizontal" android:layout_height="wrap_content" > When this button appears on smaller screen how can i make it the button also scale own smaller? Thanks! EDIT: Okay so heres the new code. But I'm unsure of how to make the edit

SVG scaling in Internet Explorer

假装没事ソ 提交于 2020-01-03 04:23:06
问题 I've tried the solutions in the following questions but none of them seem to work: Scaling/Resizing SVG in an HTML How to scale SVG properly and responsively in HTML5? Best practice for using SVGs, regarding height and width? In the last question, the height and width are both specified in the CSS, however I only want to specify one of the dimensions. For instance, currently I have a max-height in my CSS that controls the height of the image. Here is the code I have: HTML <a href='#schedule'>