zooming

PdfRendering zoom on page

三世轮回 提交于 2021-02-19 04:17:55
问题 I'm working on a project where I need to display PDF content inside our application. I'm trying to use PdfRenderer of Android API. For now, I'm able to show a pdf page as bitmap and move between all other pages. But I don't understand how to implement zoom on a page. I mean I know how to zoom an image, but for pdf it needs to be recalculated at every zoom level (such as tile ?). On zoom I need to recalculate Bitmap with correct Rect and Matrix I guess, that's the point I'm missing. Does some

How to set panning limits on WPF Canvas based on zoom level?

时间秒杀一切 提交于 2021-02-10 20:48:14
问题 I'm trying to set zooming and panning limits on a control I found here: https://wpfextensions.codeplex.com I managed to set zooming limits, but now I'm having trouble setting the panning limits so that you can't pan the object inside the canvas, outside the view. I succeeded in setting the limits, but only when the zoom level is 1 ( Zoom == 1 , so no zoom), but the moment you increase the zoom (by rotating the mouse wheel) things start to go wrong : the limits are set, but they are not set

How to set panning limits on WPF Canvas based on zoom level?

落花浮王杯 提交于 2021-02-10 20:47:19
问题 I'm trying to set zooming and panning limits on a control I found here: https://wpfextensions.codeplex.com I managed to set zooming limits, but now I'm having trouble setting the panning limits so that you can't pan the object inside the canvas, outside the view. I succeeded in setting the limits, but only when the zoom level is 1 ( Zoom == 1 , so no zoom), but the moment you increase the zoom (by rotating the mouse wheel) things start to go wrong : the limits are set, but they are not set

dc.js responsive map and zoom function (mousewheel)

≯℡__Kan透↙ 提交于 2021-02-10 18:35:29
问题 I have forked the example dc.js (version 4) map file is this JsFiddle. What I want is for the map to be responsive to the Bootstrap container. So, if the screen size changes the map is displayed correctly. The SVG is responsive by setting the width and height to null and a CSS format to set the width and height to 100%. However I see that the underlying <g> (layer0) element is not responsive. Therefore I tried to add a scale element to the projection. But unfortunately I don't know how to

setting the zoom level to 7.25 in shiny leaflet r

喜欢而已 提交于 2021-02-08 11:08:39
问题 Using leaflet function within the shiny context, I have been able to create a great interactive map. I would like to set the zoom to somewhere between 7 and 7.5 (e.g., 7.25). I tried to do so as is shown in the code below but the zoom level in the map remained unchanged. It appears that one can set the zoom level to either 7 or 7.5 not anything between these numbers. How can fix this? Thanks. setView(-82.706838, 40.358615, zoom=7.25) 回答1: Use leaflet map options: zoomSnap: how small you can

setting the zoom level to 7.25 in shiny leaflet r

℡╲_俬逩灬. 提交于 2021-02-08 11:07:01
问题 Using leaflet function within the shiny context, I have been able to create a great interactive map. I would like to set the zoom to somewhere between 7 and 7.5 (e.g., 7.25). I tried to do so as is shown in the code below but the zoom level in the map remained unchanged. It appears that one can set the zoom level to either 7 or 7.5 not anything between these numbers. How can fix this? Thanks. setView(-82.706838, 40.358615, zoom=7.25) 回答1: Use leaflet map options: zoomSnap: how small you can

How to zoom to center of canvas, not to center of context

荒凉一梦 提交于 2021-02-08 06:52:48
问题 I have a canvas, size 400 x 400. On it, i have drawn a map area, 200 x 200. I have translated this to the center of the canvas. I can zoom in and out, all is well. But, when i pan, it zooms from the center of my map area. I want it to always zoom from the center of the canvas no matter where the map area is. I think i need to negate the pan coords somehow, but i can't figure it out. Here is my code: var canvas = document.getElementById("myCanvas"); var ctx = canvas.getContext("2d"); var

Zoom to cursor without canvas in javascript

允我心安 提交于 2021-02-07 04:02:03
问题 I have an <img> that is zoomed upon mousewheel scrolling, by adjusting transform: scale() . I want the zooming to be like in Google Maps, where you zoom to where the mouse cursor is, not to the center of the image. I'd like to not use canvas though, just for the learning experience (that's also why the other questions I found did not really help). I set up a JSFiddle to demonstrate the problem. My thought process was as follows: when zooming in by 10%, the image expands in all directions,

Zoom to cursor without canvas in javascript

依然范特西╮ 提交于 2021-02-07 04:00:07
问题 I have an <img> that is zoomed upon mousewheel scrolling, by adjusting transform: scale() . I want the zooming to be like in Google Maps, where you zoom to where the mouse cursor is, not to the center of the image. I'd like to not use canvas though, just for the learning experience (that's also why the other questions I found did not really help). I set up a JSFiddle to demonstrate the problem. My thought process was as follows: when zooming in by 10%, the image expands in all directions,

Javascript OpenLayers before zoom event listener

╄→尐↘猪︶ㄣ 提交于 2021-02-06 11:23:52
问题 I am trying to set up OpenLayers to not display the vector layer just before a zoom starts and make it reappear after a zoom ends. I have the zoom ends part already established like this: map = new OpenLayers.Map('map_element', { eventListeners: { "zoomend": mapEvent}}); function mapEvent(event) { if(event.type == "zoomend") { hide_vector_layer(); } } But I don't see any kind of event listener for the start of a zoom in the documentation. There is a "movestart" which covers moving, panning,