zooming

Zooming in on quadratic curve line in c#

十年热恋 提交于 2019-12-12 06:08:31
问题 I am relatively new to c# and i am trying to draw the quadratic curve with an X and Y graph to scale with. The i drew curve although appears at the upper left corner of the screen which is very small and barely noticeable. Is there possible way to enlarge my curve line and align it to the middle so it can be shown properly? protected override void OnPaint(PaintEventArgs e) { float a = 1, b = -3, c = -4; double x1, x2, x3, y1, y2, y3, delta; delta = (b * b) - (4 * a * c); x1 = ((b * (-1)) +

Javascript Zoom on different tabs

心不动则不痛 提交于 2019-12-12 03:28:59
问题 I have made a simple zoom in and out function with button as well as mousewheel function. The main concept is to limit the maximum zoom level and minimum zoom level. I have successfully made it in two ways BIN 1 BIN 2 But i tried to make this in a tab section with unique ID or by class. My script var zoomLevel = 100; var maxZoomLevel = 150; var minZoomLevel = 50; var initW=0,initH=0; function zoom(zm) { var img=document.getElementById("pic"); if(zm > 1){ if(zoomLevel < maxZoomLevel){

How to stop android webview content reflow when double tapped?

蓝咒 提交于 2019-12-12 01:29:54
问题 First of all, I would like the WebView can be scrolled but it need to behave just like a picture such that the scrolling would not cause the WebView to rearrange its layout to fit screen. It should just provide scrollbar when the page is really bigger than screen. I have read How to stop android webview from wrapping content while zooming?. It works except the double tap performed. To regenerate the problem, 1. I load a web page which is full of text to fullscreen WebView. 2. double tap the

iPhone Detect Zoom - Help!

与世无争的帅哥 提交于 2019-12-11 12:07:56
问题 This works in all my test browsers: <body onresize="handleResize()"> // Aint perfect, but works well enough! function handleResize() { // Document.ready sets initialWidth = window.innerWidth; var zoomAmount = Math.round((initialWidth / window.innerWidth) * 100); $('#db').html(zoomAmount); } On iPhone when I use two fingers to zoom in and out, this number is not updated. How can I trigger an event when the iPhone user zooms? 回答1: You can't. When you pinch to zoom on the iPhone web kit, you're

Zoom left and right axis for dual scaled chart in d3

微笑、不失礼 提交于 2019-12-11 09:39:54
问题 I have dual scaled line chart using d3, coffescript is below # bottom axis xScale = d3.time.scale().range([0,width]).domain(d3.extent(data, (d) -> d.date)) xAxis = d3.svg.axis().scale(xScale).orient("bottom").ticks(5) # left axis yLeftMax = d3.max(data, (d) -> d.price) yLeftScale = d3.scale.linear().domain([0, yLeftMax]).range([height, 0]) yLeftAxis = d3.svg.axis().scale(yLeftScale).orient("left") # right axis yRightMax = d3.max(data, (d) -> d.yoy) yRightMin = d3.min(data, (d) -> d.yoy)

How to deal with zoom in responsive layouts?

混江龙づ霸主 提交于 2019-12-11 06:18:32
问题 How to deal with zoom in responsive layouts ? All get messy when zooming this site : http://bostonglobe.com/ I loved the layout and responsive effects but sometimes my user will zoom content. Thanks 回答1: Simply avoid fixed units and use percentage or em units for your elements. Zoom is a useful feature browsers provide to users surfing your site, and it will mess up your text and layout to some extent anyway. The best thing you can do is make sure your site is completely zoomable, not going

pinch zooming for a UIWebView for ios 3.0 and newer

风格不统一 提交于 2019-12-11 05:08:07
问题 I've been reading about how to support the zooming for a webview, and i've found a lot of resources. And now i'm really lost. What i've read: all you need is to enable the 'scales page to fit' add the uiwebview inside a uiscrollview (while setting the minimum/maximum zoom scale and implementing - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView) then you might need to handle the touchdown events... manually then you might have to recognize them... manually... or using a gesture

Zoom In and Zoom out functionality on a button click on JfreeChart line graph?

笑着哭i 提交于 2019-12-11 03:50:08
问题 Basically i want the line graph to be zoomed in and Zoomed out(total 4 buttons,2 for X-axis(Zoom in and Zoom out) and other two for Y-axis) on a button click along any axis like if the graph drawn on negative x-axis and negative Y-axis area ,depending on data points then on button click the graph should be Zoomed in and Zoomed out along that negative x-axis or negative Y-axis based on button click. How can i achieve this ?Any sample code with detail Explanation is much helpful!! private

How to show builtin Zoom Controlls in webview in Android

半世苍凉 提交于 2019-12-11 02:32:32
问题 may be duplicate to this [Always show zoom controls in WebView1 but I just want to display the zoom controls not necessary always. Basically i have a list View and i fill this with the multiple webview in getVIew Method. Here is the code public View getView(final int position, View convertView, ViewGroup parent) { View vi = convertView; if (convertView == null) { vi = inflater.inflate(R.layout.book_reader_list_style, parent, false); holder = new ViewHolder(); holder.webView = (WebView) vi

JFreeChart Link Axes

夙愿已清 提交于 2019-12-11 01:00:59
问题 I have created a Frame with two independent separate JFree charts (held in a 2x1 Grid layout). The top chart shows a Canlestick chart, the bottom a time series plot. What I would like to do is link the displayed X-Axis of both charts so that when I zoom in on one chart the other chart zooms to the corresponding time period. Is this possible? If so could you give me an example 回答1: What you need is called CombinedDomainXYPlot . Instead of creating independent JFreeChart objects you will need