|
If you have a QImage wrapped inside a QLabel, is it possible to scale it up or down when you resize the window and maintain the aspect ratio (so the image doesn't become distorted)? I figured out that it can scale using setScaledContents(), and you can...
Started by jgoney on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You could either pass the image in and query it, or you could just set the ratio directly.
Overrides bool hasHeightForWidth() and int heightForWidth( int width) to preserve the aspect ratio somehow.
|
|
Here's the problem. I have an image:
<img alt="alttext" src="filename.jpg"/>
Note no height or width specified.
On certain pages I want to only show a thumbnail. I can't alter the html, so I use the following CSS:
.blog_list div.postbody img { width...
Started by Tom Wright on
, 5 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The only features:
The image aspect....
The aspect ratio won't be perfect, but you could make it look that would read the original picture width, and set the ratio accordingly to specify a height.
; }
The above code will only be seen by IE6 .
|
|
As some of you who may noticed (those who have widescreen panels and are into retro-gaming or play games at anything other than your desktop resolution), there's a bug in the ATI drivers for W7 (maybe Vista, don't know) that disables scaling and doesn...
Started by morphine on
, 30 posts
by 10 people.
Answer Snippets (Read the full thread at techreport):
NOTE: The aspect....
Choose an option, and click the "Finish" button.
Here's how you get at the aspect ratio settings in the legacy Vista drivers panel
- Resize, but keep the image's original dimensions (aspect ratio)
8.
Legacy" Vista drivers.
|
Ask your Facebook Friends
|
Power to Weight ratio list, and my supercharged miata on the scales and dyno I got on the dyno with my supercharged miata last week, at my old shop, TTP in Little Falls, NJ. They had 48 cars waiting to be worked on last month, but they got it down to ...
Started by GIGAPUNK on
, 20 posts
by 7 people.
Answer Snippets (Read the full thread at mensalmanac):
If you check out the pic of the scale screen there are two arrows pointing at the right-front wheel.
I believe that if life gives you.
Pretty close to the same power/weight ratio as my teg.
Nice power.
|
|
Scaling a sketch to different X & Y ratios
Can SW scale a *sketch* differently in X & Y like can be done with blocks in AutoCAD, etc.
I can work around by converting a closed sketch to a surface and then scaling but it's a PITA.
Sort of funny- the last...
Started by sigmatero on
, 4 posts
by 2 people.
Answer Snippets (Read the full thread at cadtutor):
If the sketch is under-defined you....
You can also convert your sketches to Blocks and scale.
You can do this with Tool>Sketch Tools>Scale.
As far as i know you can only scale with a percentage, not a separate number in X and Y.
|
|
Anybody here happen to be good with graphics in Game Maker? My specific problem has to do with scaling a game to fit certain resolutions and aspect ratios without sacrificing image quality. How can I keep a consistently good image between different aspect...
Started by Trogador on
, 6 posts
by 4 people.
Answer Snippets (Read the full thread at gamemakergames):
I'm going off still use this aspect ratio..
Using the 4:3 aspect ratio? It would be great to just ditch the aging 4:3 altogether.
|
|
The problem here is I have a display window of size x by y, and I need to display an image inside the window without any scrolling, and to maintain the aspect ratio of 4:3. I have the following snippet of code:
// Lock the current height, calculate new...
Started by Extrakun on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Case 1: If w/h > 1.25 , then divide....
Just take the minimum of the both calculated values:
scale = min(scaleFactorWidth, scaleFactorHeight)
or (if you want outer-fit)
scale = max(scaleFactorWidth, scaleFactorHeight)
Find the largest = 1.25.
|
|
Should I use decimal or float to store a ratio in a database? Particularly in SQL2005.
Started by Jack on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
If you need exact numbers, you might even want but it could fail matches on certain values ... .
A 1 or 2 digits, and you know the maximum ratio is going to be under maxint/1000, I'd think about storing the ratio mulitplied by 100 in an int.
|
|
I'm working on a UI which needs to work in different aspect ratios, 16:9, 16:10, 4:3
The idea is conceptually simple: Everything is centered to the screen in a rough 4:3 area and anything outside this portion of screen has basic artwork, so something ...
Started by meds on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
For 4:3 displays, set the border size to 0 to make the active area cover the full screen... .
Can't you just come up with an abstraction layer, that hides the differences? One idea could be to model a "border" around the active area, that gets added .
So ...
|
|
I'm fairly new to WPF and I've come across a problem that seems a bit tricky to solve. Basically I want a 4x4 grid thats scalable but keeps a square (or any other arbitrary) aspect ratio. This actually seems quite tricky to do, which surprises me because...
Started by cletus on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Control is used to stretch or scale a child element and lets you control the way the child is stretched.
|