scaling

Resolution independent websites? (Or, “Scaling an entire website to fill the browser”)

家住魔仙堡 提交于 2019-12-11 03:04:14
问题 I'm working on a project that would really benefit from filling the whole screen -- it's essentially one 7000px-long page with a giant background filling the whole length (probably chopped into separate pieces and loaded in an intelligent sequential fashion in the final version), with 5 or 6 different segments/areas/slides (basically, "content areas") as you scroll down. At the top is a navigation bar that fills the entire horizontal width of the design. Below it, on the background, are a

Android - Scaling of Button with background image

天涯浪子 提交于 2019-12-11 02:30:56
问题 I have a screen layout that includes 3 Button controls contained within a linear layout (horizontal). The Buttons each have a background image. See XML below : <LinearLayout android:id="@+id/notificationform_llt_ApprovalBtns" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="8dp" android:orientation="horizontal" android:paddingLeft="8dp" android:paddingRight="8dp" > <Button android:id="@+id/notificationform_btn_Approve" android:layout_width="0dp

Coordinate scaling causes too large font sizes in QPainter::drawText

∥☆過路亽.° 提交于 2019-12-10 23:05:13
问题 I'm working on simple 2D visualization module for MD simulation code. What I'm trying to do is drawing positions of simulated molecules using: myPainter.drawEllipse(myQPoint,myRx,myRy) And that part works pretty good on my visualization widget. The thing that happened to be a problem is writing text which should represent each molecule's ID (integer). myPainter.drawText(myPosPoint,QString::number(mySoftMolecule2D->getID())); It draws text but it is too large. This is probably because I need

Scaling of the point sprites (Direc3D 9)

旧巷老猫 提交于 2019-12-10 21:56:06
问题 Tell me please what values should ​​I set for D3DRS_POINTSCALE_A, D3DRS_POINTSCALE_B, D3DRS_POINTSCALE_С to point sprites scaled just like other objects in the scene. The parameters A = 0 B = 0 and C = 1 (proposed by F. D. Luna) not suitable because the scale is not accurate enough and the distance between the particles (point sprites) can be greater than it should be. If I replace the point sprites to billboards, the scale of the particles is correct, but the rendering is much slower. Help

custom axis scale in matlab

一笑奈何 提交于 2019-12-10 16:45:23
问题 Is there a simple way to obtain customized scaling on the plot axis? e.g., the semilogy function provides {x, log10(y)} scaling such that one can automatically zoom in/ot and ticks and labels automatically adjust. I would like to have the same thing with the {x, asinh(2*y)} scaling. the solution: plot (x, asinh (2*y)); set (gca, 'YTickLabel', num2str (sinh (get (gca, 'YTick')(:)) / 2, '%g')) works for a "static" plot but I would like to have the ticks - label to autoadjust when zooming... 回答1

CSS scaling a border-image

我的梦境 提交于 2019-12-10 13:37:00
问题 I am seeking some assistance creating a border that scales with different screen sizes/devices. I've attached both the desired outcome, html/css I've written so far and a live page to preview the results so far. Issues/Questions: The border is set using pixels, and I'm concerned that it won't scale to the proper proportions on different devices/browsers. The corners don't match very well. Is there a better way to achieve the desired border so as to scale proportionally and achieve the desired

iPhone 6 scaling using launch images

谁说胖子不能爱 提交于 2019-12-10 12:06:19
问题 My app scales the same on iPhone 6 and 6 plus as on the 5. I'm trying to get the app to use the extra screen space on the larger phone. I've read about using the appropriate size launch images, but it only works in the simulator, not on the device. I added a 750x1334 launch image for the iPhone 6, and the various sizes for the other devices. When I launch in the simulator, the scaling takes place as expected. When I launch on the device, the screen scales to the iPhone 4s scale instead. I

How to dynamically detect browser viewport change in size?

∥☆過路亽.° 提交于 2019-12-10 10:27:19
问题 I've been having problems with scaling... automatic... dynamic... adaptive.... etc... I have seen websites where as you make the window smaller eg. grab a corner and make the window smaller, fonts get bigger, things move around... I've got the moving part, I don't know how to dynamically detect the browser viewport... is that a refreshing thing or?... As you can see here, these motion things that I've used only work upon screen refresh, in particular I have a tablet, and if I visit the page

Scale drawableLeft in button with text

半腔热情 提交于 2019-12-10 04:35:29
问题 I have a button with text and a drawable on the left. Is there any way I can make that drawable scale to it's appropriate size (fill button's height) while keeping its aspect ratio? Relevant excerpt from my layout: <Button android:text="@string/add_fav" android:id="@+id/event_fav_button" android:layout_width="match_parent" android:layout_height="40dp" android:drawableLeft="@drawable/star_yellow"/> 回答1: You can resize an image on basis of the dimension of a Button, use getHeight() and getWidth

Scaling canvas element with static resolution

纵然是瞬间 提交于 2019-12-10 01:21:19
问题 I have canvas element and I want to scale it down, but without changing it's js logic. Drawing space in js should always be 600x300px, even if it is displayed in HTML as 300x150px. I know, I can resize image with static resolution, but can I do the same with canvas? 回答1: Changing the size using CSS scales it Live Demo So basically you set its size for drawing objects, etc, via the width and height properties like so var canvas = document.getElementById("canvas"), ctx = canvas.getContext("2d")