Questions tagged [scale]

The scale tag is mostly used for questions that relate to proportional resizing of images or UI elements. It is also used for questions related to function scale() in R language.

In scientific software for statistical computing and graphics, the function scale performs standardization of a vector or a matrix (by column).

4504 questions
18
votes
4 answers

Rails: Cannot add :precision or :scale options with change_column in a migration?

This seems to have been asked before: rails decimal precision and scale But when running a change_column migration for :precision or :scale they don't actually affect the schema or database, but db:migrate runs without errors. My migration file…
Joshua Pinter
  • 45,245
  • 23
  • 243
  • 245
18
votes
5 answers

Opencv multiply scalar and matrix

I have been trying to achieve something which should pretty trivial and is trivial in Matlab. Using methods of OpenCV, I want to simply achieve something such as: cv::Mat sample = [4 5 6; 4 2 5; 1 4 2]; sample = 5*sample; After which sample…
Arpan Shah
  • 243
  • 1
  • 3
  • 9
18
votes
2 answers

JavaFX correct scaling

I want to scale all nodes in a Pane on a scroll event. What I have tried so far: When I do scaleX or scaleY, border of pane scales respectively (seen when set Pane style -fx-border-color: black;). So not every event would start if I'm not from the…
lummycoder
  • 588
  • 1
  • 7
  • 20
18
votes
5 answers

Scaling a numeric matrix in R with values 0 to 1

Here is an excerpt of numeric matrix that I have [1,] 30 -33.129487 3894754.1 -39.701738 -38.356477 -34.220534 [2,] 29 -44.289487 -8217525.9 -44.801738 -47.946477 -41.020534 [3,] 28 -48.439487 -4572815.9 -49.181738 -48.086477…
user2015601
17
votes
7 answers

Can't scale device window in iOS Simulator

On the 24" iMac I'm using at work I cannot scale the iOS Simulator's window. The 100% and 50% menu entries are greyed out (and the keyboard shortcuts don't work either.) On my Mac Mini at home, it's fine. I've searched high and low for someone with…
vlad259
  • 1,236
  • 10
  • 24
17
votes
2 answers

Why is text getting blurry and wobbles during 2d scale transform

I want to make this card to scale on hover (including the elements inside it) but the text wobbles/jitters during the transformation (when you hover the card) and gets blurry during and after it's scaled (sometimes, with some ratios more than…
Un1
  • 3,874
  • 12
  • 37
  • 79
17
votes
1 answer

Android resize bitmap keeping aspect ratio

I have a custom view (1066 x 738), and I am passing a bitmap image (720x343). I want to scale the bitmap to fit in the custom view without exceeding the bound of the parent. I want to achieve something like this: How should I calculate the bitmap…
Zbarcea Christian
  • 9,367
  • 22
  • 84
  • 137
17
votes
3 answers

Get scale and rotation angle from CGAffineTransform?

I want to get scale factor and rotation angle form view. I've already applied CGAffineTransform to that view.
hmdeep
  • 2,910
  • 3
  • 14
  • 22
17
votes
4 answers

Scaling a Phonegap app for different Android screen sizes/densities?

I have a Phonegap app designed to run on Android phones and tablets. The scale of text and images looks fine on a phone, but too small on a 7” tablet. Is there a way to set the scale for different screen sizes/densities that works for a…
DaveAlden
  • 30,083
  • 11
  • 93
  • 155
17
votes
1 answer

I think CSS3 transform translateZ is equal to scale by some means

In some case, I think the translateZ and scale have the same effect ,just like zoom in or zoom out. I think there are some calculate connection between them, if I konw one value of them, like translateZ(-1000px) and the parent perspective value, can…
hh54188
  • 14,887
  • 32
  • 113
  • 184
16
votes
6 answers

SwiftUI - Text minimumScaleFactor not scaling only when needed

I have a Text that I want to modify with a .minimumScaleFactor(0.1) when the length of its string extends outside the view. However, the scaling applies every time, even when the original font size would be perfectly fine. My view is structured…
A. Lucas
  • 261
  • 3
  • 11
16
votes
7 answers

UIButton scale on touch?

Can someone tell me how I can scale an UIButton on touch? The button should scale up like 10%. Thanks in advance!
trnc
  • 20,581
  • 21
  • 60
  • 98
16
votes
1 answer

How to scale sprites in libgdx according to screen resolutions?

I am trying to scale the texture to fit the screen width. This is what I tried, but it simply repeats the texture. It does not scale it. In the init method: TextureLoader.TextureParameter param = new TextureLoader.TextureParameter(); param.minFilter…
Z0q
  • 1,689
  • 3
  • 28
  • 57
16
votes
5 answers

Image shifting/jumping after CSS transition effect with scale transform in Firefox

I have a problem in latest Firefox browser version 34 (system: Windows 7, screen width: 1600px). I made effect with zooming images (in some container) after hover on it. I am using transform: scale(1.1) with transition: transform 0.3s ease-in-out.…
Cichy
  • 4,602
  • 3
  • 23
  • 28
16
votes
2 answers

Android VideoView how to scale as ImageView scale type fitXY?

I put an ImageView and a VideoView in a RelativeLayout. The ImageView can be scaled to fill the whole layout by scaleType="fitXY". However, there is no similar scale attribute for the VideoView. By the way, I hide the video control by set…
Jones
  • 307
  • 1
  • 4
  • 11