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
21
votes
1 answer

Unwanted left margin when using -webkit-transform: scale(...)

I am using wkhtmltopdf (which uses the Webkit rendering engine) to convert HTML files to PDF documents. The generated PDFs are A4. In other words, they have fixed dimensions, and thus a limited width. One of the tables in my PDF contains images,…
Kosta Kontos
  • 4,152
  • 7
  • 25
  • 28
20
votes
1 answer

when scaling an element with css3 scale, it becomes pixelated until just after the animation is complete. I'm animating an element with a border

http://jsfiddle.net/nicktheandroid/5Ytnj/ When I add -webkit-backface-visibility: hidden; to the .circ element, it causes it to stay pixelated even after the animation is complete. I'm wondering if there's a way to get it to not pixelate while…
android.nick
  • 11,069
  • 23
  • 77
  • 112
20
votes
1 answer

Have text scale up in size to fit the container

Using CSS, and specifically no onload javascript, would it be possible to do this: You have a cell of 150px wide and 100px in height. It contains a text, e.g.: $20,00 or any variant of that. You want it to perfectly fit the size of the…
MHD
  • 1,245
  • 2
  • 12
  • 18
20
votes
4 answers

CSS3 transform:scale in IE

I would like to use the CSS3 property transform:scale. div { transform: scale(0.5,0.5); } Is there a way to imitate this in Internet Explorer 8 and lower? May be something with filter or a Javascript solution? I've searched the web without any…
Vinzcent
  • 1,438
  • 6
  • 33
  • 59
20
votes
5 answers

Can I use Calc inside Transform:Scale function in CSS?

I'm trying to calculate the right scale to apply to children inside a parent but i can't use calc() inside transform: scale CSS function. I've done this function with javascript but i'm interested in a pure CSS solution to avoid bloating the page…
Andu
  • 209
  • 1
  • 2
  • 5
20
votes
2 answers

How do I scale an SVG that has some complex path definitions?

I have an SVG whose code is like what follows:
nhuff717
  • 369
  • 2
  • 3
  • 17
20
votes
4 answers

Android ImageView ScaleType and item height

Things looked quite simple first but in the end the result is not good. I have an image which has a width larger than screen's width. So I need to scale it down in my imageview. I looked over the ScaleType options and tried them all but none is ok.…
Alin
  • 14,809
  • 40
  • 129
  • 218
19
votes
6 answers

Scaling an image to max available width, keeping aspect ratio and avoiding ImageView extra space

I have this simple layout XML, and a green_square.png file which is 30X30 pixels
Shlomi Schwartz
  • 8,693
  • 29
  • 109
  • 186
19
votes
3 answers

How to have similar mechanism of center-crop on ExoPlayer's PlayerView , but not on the center?

Background We record a video of the user's face, and usually the face is located at the upper half of the video. Later we wish to view the video, but the aspect ratio of the PlayerView might be different than the one of the video, so there needs to…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
19
votes
2 answers

How to scale the size of line and point separately in ggplot2

The code is as follows: set.seed(123) d1=data.frame(x=runif(10),y=runif(10),z=runif(10,1,10)) d2=data.frame(x=runif(10),y=runif(10),z=runif(10,100,1000)) ggplot()+geom_point(aes(x,y,size=z),data=d1)+ geom_line(aes(x,y,size=z),data=d2) And the…
Tiger
  • 215
  • 2
  • 8
19
votes
1 answer

WPF scale text to fit only when too big

I am trying to setup a list of items in WPF which contains strings of random length (people's names). The majority of them are generally within a certain size, but occasionally you come across a string so long that it runs out of the bounds of it's…
Robert Petz
  • 2,718
  • 4
  • 23
  • 52
19
votes
4 answers

css3 scale transform on parent div but keeping constant size in some of the associated divs

I'm using css3 scale transform to scale a div that contains other divs inside. The problem I have is that some of the inner divs I need to keep as they were, basically as if they were not scaled, their size should not change, however I do need to…
Javier Gonzalez
  • 369
  • 1
  • 2
  • 9
18
votes
3 answers

Android: how to detect touch location on ImageView if the image view is scaled by matrix?

I set OnTouchListener of an ImageView and implement onTouch method, but if the image is scaled using matrix, how do I calculate the location of the touch? Or does the motion event automatically takes that into account when returning getX() and…
Heuristic
  • 5,087
  • 9
  • 54
  • 94
18
votes
3 answers

Scale PDF to fit iFrame

I need to scale a PDF file to fit the iFrame. It needs to be responsive, so the PDF should scale with the device width so that the PDF document displays a complete page. If there is a free plugin or a function in Bootstrap to make this happen, I…
Luuxter
  • 205
  • 1
  • 3
  • 7
18
votes
2 answers

Process Management for the Go Webserver

I'm a new Go programmer, coming from the world of web application and service development. Apologies is this is a herp de-derp question, but my googling around for an answer hasn't found anything. Also, this is borderline Server Fault territory,…
Alana Storm
  • 164,128
  • 91
  • 395
  • 599