zooming

C#: Simple and functional way to zoom picturebox images with scroll bars

我与影子孤独终老i 提交于 2019-11-29 06:19:53
Is there a simple and functional way to zoom an image in a picturebox including scroll bars? At the moment, I use a picture box in a panel with auto scroll activated. To zoom, I enlarge the picturebox and move it with the scroll bars on the panel. The problem is, that it behaves strange. For example: If you zoom in to far, the margin between the upper and left form border and the image get's bigger and bigger. That's the zooming method. I got it from here . private void ZoomInOut(bool zoom) { //Zoom ratio by which the images will be zoomed by default int zoomRatio = 10; //Set the zoomed width

iOS 8 Safari - Can't scroll element's content when page is zoomed

折月煮酒 提交于 2019-11-29 04:50:58
This issue happens only in iOS 8 (8.1 to be exact). It does not reproduce in iOS 7. The use-case: Scrolling inside an element with scrollable (long) content. If the page is not zoomed-in - it works as expected. When you zoom-in the page - it stops working, the page is scrolled instead (as if you reached the end of the scrollable content). The effect is continuous: the higher the zoom - it's less possible to scroll the content. Test page: here Open the link in your iOS 8 Safari - see that the list element is scrollable. Now zoom-in the page and try to scroll the content of the list - the page

Zooming bar-graph with d3.js

若如初见. 提交于 2019-11-29 04:06:31
I am trying to create a bar graph with a time scale where its possible to zoom into any time period. I was able to create the zooming functionality for my x-axis(time scale) however my data (in this case rects) doesn't zoom along with my axis. Here is a simplified version of my graph: http://jsfiddle.net/gorkem/Mf457/5/embedded/result/ As you can see I can zoom in to my x-axis but the bars do not zoom along. and here is the jfiddle link: http://jsfiddle.net/gorkem/Mf457/6/ var y = d3.scale.linear().domain([0, max_val]).range([graph_height, 0]); var x = d3.time.scale().domain([minDate, maxDate]

How do I stop a CSS layout from distorting when zooming in/out?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 01:26:23
I've set up a very basic site with a #container div that includes the #navbar and #content. However, when I zoom in or out, the #navbar distorts, if I zoom in the links get pushed down below each other instead of being inline. If I zoom out, too much padding is added between the links. How can I stop this? HTML: <div id="navbar"> <ul> <li><a href="index.html">Home</a></li> <li><a href="top.html">Top</a></li> <li><strong><a href="free.html">FREE</a></strong></li> <li><a href="photo.html">Photo</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact Us</a></li> </ul>

Set a max zoom level on LatLngBounds builder

匆匆过客 提交于 2019-11-28 17:04:16
I haven't found an answer in my search, there are a few answers on SO but they didn't work for me. I have 2 markers on the map and I am using LatLngBounds builder in order to let the camera zoom to the right zoom level to include them both. Everything works as expected aside one thing, when the 2 markers are really close to each other, the map is very very zoomed and well, it doesn't make any sense to have this level of zooming. LatLngBounds.Builder builder = new LatLngBounds.Builder(); builder.include(firstMarker.getPosition()); builder.include(secondMarker.getPosition()); LatLngBounds bounds

set Android ZoomButtonsController alignment?

旧街凉风 提交于 2019-11-28 11:55:21
问题 Im implementing a ZoomButtonsController in my custom View and have been trying to figure out how to align it to the bottom right hand corner of the screen (it aligns to the bottom middle by default) but havent had any luck. 回答1: ZoomButtonsController can be defined in XML files and can be positioned accordingly , for eg. <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" > <ZoomControls android:id="

resize all subview in scrollViewDidZoom

折月煮酒 提交于 2019-11-28 11:49:58
Below is my screen design. . I want Zoom in/out in **mainView**. mainView Width & Height is 300. To Zoom in/out i have implement the below method and its working fine with this. - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return mainView; } Everything is fine up to this. I have set scroll.minimumZoomScale=1 and scroll.maximumZoomScale=5 . During Zoom in time mainView Frame increase depend on **scrollView.zoomScale** and i have check - (void)scrollViewDidZoom:(UIScrollView *)scrollView in this method. At Zoom in time **if i get scrollView.zoomScale=2 than mainView Width

UIScrollView with touchesMoved not called

那年仲夏 提交于 2019-11-28 09:50:32
问题 I've a UIScrollView that contains an UIImageView. The UIScrollView lets zooming and panning through the UIImageView. The problem is that I would like know the finger movement every time, and I'm trying to catch the event with touchesMoved method. But it's not working, despite touchesBegan and touchesEnded that are called correctly. In fact, touchesMoved is called if the finger movement is really small, and the UIScrollView doesn't started panning. At the moment that UIScrollView starts

Double Tap Zoom in GoogleMaps Activity [duplicate]

自闭症网瘾萝莉.ら 提交于 2019-11-28 05:58:56
问题 Possible Duplicate: Double Tap -> Zoom on Android MapView? I am newbie Android developer. I am developing an application in which I am using GoogleMaps. I have to implement double tap zoom in GoogleMaps. When I double click on the map it should zoom in. Kindly if it is possible provide a sample code. I have written the following code but I dont know what to add more. public class Maps extends MapActivity implements OnGestureListener, OnDoubleTapListener { private GestureDetector detector;

How to control zoom in webView

爷,独闯天下 提交于 2019-11-28 00:34:36
I have this code: [...] { webView = (WebView) findViewById(R.id.webView1); webView.setInitialScale(getScale(Double.parseDouble(pubPages))); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setSupportZoom(true); webView.getSettings().setBuiltInZoomControls(true); webView.getSettings().setDefaultZoom(WebSettings.ZoomDensity.FAR); webView.getSettings().setLoadWithOverviewMode(true); webView.getSettings().setUseWideViewPort(true); webView.setPadding(0, 0, 0, 0); webView.setWebChromeClient(new WebChromeClient() { public void onProgressChanged(WebView view, int progress) {