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
984
votes
35 answers

Auto Scale TextView Text to Fit within Bounds

I'm looking for an optimal way to resize wrapping text in a TextView so that it will fit within its getHeight and getWidth bounds. I'm not simply looking for a way to wrap the text- I want to make sure it both wraps and is small enough to fit…
Nathan Fig
  • 14,970
  • 9
  • 43
  • 57
312
votes
18 answers

How to capture UIView to UIImage without loss of quality on retina display

My code works fine for normal devices but creates blurry images on retina devices. Does anybody know a solution for my issue? + (UIImage *) imageWithView:(UIView *)view { UIGraphicsBeginImageContext(view.bounds.size); [view.layer…
Daniel
  • 3,331
  • 4
  • 19
  • 17
300
votes
4 answers

How do I interpret precision and scale of a number in a database?

I have the following column specified in a database: decimal(5,2) How does one interpret this? According to the properties on the column as viewed in SQL Server Management studio I can see that it means: decimal(Numeric precision, Numeric…
mezoid
  • 28,090
  • 37
  • 107
  • 148
197
votes
20 answers

Fit image into ImageView, keep aspect ratio and then resize ImageView to image dimensions?

How to fit an image of random size to an ImageView? When: Initially ImageView dimensions are 250dp * 250dp The image's larger dimension should be scaled up/down to 250dp The image should keep its aspect ratio The ImageView dimensions should match…
jul
  • 36,404
  • 64
  • 191
  • 318
179
votes
8 answers

Fit Image in ImageButton in Android

I have 6 ImageButton in my activity, I set images through my code in them ( not using xml). I want them to cover 75% of the button area. But where as some images cover less area, some are too big to fit into the imageButton. How to programatically…
Rohit
  • 6,941
  • 17
  • 58
  • 102
167
votes
8 answers

Adjusting the Xcode iPhone simulator scale and size

Is there anyway to make the iOS simulator for iPhone 5 in Xcode, be the actual size of the iPhone 5. I'm getting a huge display and things seemed to be scaled.
cdub
  • 24,555
  • 57
  • 174
  • 303
139
votes
10 answers

How to scale Docker containers in production

So I recently discovered this awesome tool, and it says Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application. The same container that a developer builds and tests on a laptop…
James Lin
  • 25,028
  • 36
  • 133
  • 233
133
votes
3 answers

What is the difference between 'log' and 'symlog'?

In matplotlib, I can set the axis scaling using either pyplot.xscale() or Axes.set_xscale(). Both functions accept three different scales: 'linear' | 'log' | 'symlog'. What is the difference between 'log' and 'symlog'? In a simple test I did, they…
Denilson Sá Maia
  • 47,466
  • 33
  • 109
  • 111
110
votes
6 answers

BigDecimal, precision and scale

I'm using BigDecimal for my numbers in my application, for example, with JPA. I did a bit of researching about the terms 'precision' and 'scale' but I don't understand what are they exactly. Can anyone explain me the meaning of 'precision' and…
jpadilladev
  • 1,756
  • 4
  • 16
  • 23
104
votes
3 answers

ConstraintLayout aspect ratio

Consider the following layout file:
100
votes
4 answers

Android image scale animation relative to center point

I have an ImageView and I do a simple scale animation to it. Very standard code. My scale_up.xml:
Tomislav Markovski
  • 12,331
  • 7
  • 50
  • 72
95
votes
5 answers

Scale and mirror SVG object

How do I most easily first scale an object, say 2 * times it's current size and then flip it vertically and horizontally, or both? As of now, I can either set "scale(2,2)" for it to become 2 times as big as it's width and height but I can't flip it…
Deukalion
  • 2,516
  • 9
  • 32
  • 50
93
votes
2 answers

Scale the contents of a div by a percentage?

Building a CMS of sorts where the user can move around boxes to build a page layout (basic idea anyway). I'd like to pull the actual contents in from the database and build out the "page", but have it display at 50% scale. I realize I could have 2…
Dave
  • 28,833
  • 23
  • 113
  • 183
88
votes
16 answers

How can I shrink the drawable on a button?

how can I make the drawable on a button smaller? The icon is too big, actually higher than the button. This is the code I am using:
84
votes
13 answers

White space around css3 scale

I have a small issue I want to fix, but can't find any good answer : When I use a scale on a div (which contains other divs), it leave white space around, from the "original" width and height of my div : How can I remove the withe space around the…
Pretty Good Pancake
  • 1,423
  • 3
  • 12
  • 28
1
2 3
99 100