Stretching images in code.
Questions tagged [stretch]
516 questions
221
votes
15 answers
CSS Div stretch 100% page height
I have a navigation bar on the left hand side of my page, and I want it to stretch to 100% of the page height. Not just the height of the viewport, but including the areas hidden until you scroll. I don't want to use javascript to accomplish…

Tom
- 4,341
- 9
- 27
- 21
134
votes
19 answers
How do I stretch an image to fit the whole background (100% height x 100% width) in Flutter?
I have an image that doesn't match the aspect ratio of my device's screen. I want to stretch the image so that it fully fills the screen, and I don't want to crop any part of the image.
CSS has the concept of percentages, so I could just set height…

Mary
- 18,347
- 23
- 59
- 76
104
votes
9 answers
HorizontalAlignment=Stretch, MaxWidth, and Left aligned at the same time?
This seems like it should be easy but I'm stumped. In WPF, I'd like a TextBox that stretches to the width of it's parent, but only to a maximum width. The problem is that I want it to be left justified within its parent. To get it to stretch you…

Scott Bussinger
- 2,767
- 4
- 28
- 29
79
votes
5 answers
Maximum width and height for ImageView in Android
So I have an ImageView set with
android:maxHeight="100px"
android:maxWidth="250px"
android:minHeight="100px"
android:minWidth="250px"
android:scaleType="centerInside"
This image view is used to show a picture that is obtained from the gallery or…

Miguel Ribeiro
- 8,057
- 20
- 51
- 74
43
votes
3 answers
Resizing and stretching a NumPy array
I am working in Python and I have a NumPy array like this:
[1,5,9]
[2,7,3]
[8,4,6]
How do I stretch it to something like the following?
[1,1,5,5,9,9]
[1,1,5,5,9,9]
[2,2,7,7,3,3]
[2,2,7,7,3,3]
[8,8,4,4,6,6]
[8,8,4,4,6,6]
These are just some example…

Matthew
- 433
- 1
- 4
- 5
37
votes
12 answers
How to Stretch WPF Tab Item Headers to Parent Control Width
Is there a way in XAML to cause the tab item headers to stretch across the width of the tab control?
For example, I have three tabs: red, blue and green. If I have a tab control with its width set to auto, the tab headers will only fill up part of…

Ben Doerr
- 1,655
- 1
- 13
- 23
33
votes
4 answers
iPhone image stretching (skew)
How do I skew an image? For example, each corner has a CGPoint with coords - p1, p2, p3, p4. Then, I need to set - p4.x+=50, p4.y+=30. So this corner (p4) should be stretched in a 2D perspective and the image should be distorted.
(source:…

Dmitry
- 1,035
- 2
- 14
- 27
32
votes
8 answers
How can I make a WPF Expander Stretch?
The Expander control in WPF does not stretch to fill all the available space. Is there any solutions in XAML for this?

coder_bro
- 10,503
- 13
- 56
- 88
31
votes
3 answers
Fitting webpage contents inside a webview (Android)
Simple question.
I'm trying to stretch the contents of a webview so that the entire webpage within is visible. i.e no scrolling. I've looked through the docs but cant find any method asides from zoom controls and setinitialscale.
The problem with…

OVERTONE
- 11,797
- 20
- 71
- 87
31
votes
11 answers
Avoid stretch on image css
I am rendering an image into a div. I want to avoid stretching of my image.
div {
height: 300px;
width: 300px;
}
img {
min-width: 300px;
min-height: 300px;
max-height: 300px;
}
My problem is that my image's width stretches. I want it…

Zincktest
- 739
- 2
- 7
- 9
25
votes
7 answers
How can I stretch the image in imagebutton to the whole area of the imagebutton?
Here is a picture that will help you understand my problem:
I want to stretch the image shown inside ImageButton to the whole area of the ImageButton.
As you can see, the picture with the number 1 only take about 95% of the ImageButton and you can…

user2051993
- 276
- 1
- 3
- 6
24
votes
1 answer
WPF: How to make controls stretch in a StackPanel?
A Slider and some other controls won't stretch to fill available space when placed in a StackPanel; instead the width is always MinWidth (or about 10 pixels if MinWidth is not set). How do I make it stretch (the equivalent of…

Qwertie
- 16,354
- 20
- 105
- 148
22
votes
3 answers
How do I get a TextBox to fill a resizable column?
I'm trying to get a TextBox to fill the available space in a resizable column. The TextBox is part of a user control:

imekon
- 1,501
- 4
- 22
- 39
19
votes
5 answers
Why FontStretch does not work in WPF?
I am trying setting FontStretch property on a TextBlock in WPF but it seems that it does not work. I tried Expanded, Condensed, etc. but the text appearance does not change.
I am working on Windows XP with Framework 4.0 and tested both with Verdana…

Drake
- 8,225
- 15
- 71
- 104
19
votes
4 answers
physically stretch plot in horizontal direction in python
I want a simple x,y plot created with matplotlib stretched physically in x-direction.
The intention is to get a result were it is easier for me to detect features in the signal.
So I don't want to change any scales or values or limits. Just change…

Bachbold
- 424
- 1
- 6
- 14