Zoom into picture - javafx-2

I have this picture which I want to display into JavaFX application.
I tested to use setFitHeight and setFitWidth but the image is shrink. I want to zoom the original picture and display only the center of the image keeping the original size. Is this possible?

Define a viewport in an ImageView.

Related

Xamarin: display image at real size

Trying to simply display an image at it's full size, which is bigger then the screen width and height. I do not care because I am developing a page for pinch and pan. So, the image will be off the screen anyways, and I would like to use a bigger image for pinch and pan, and it keeps setting the width to screen width when I just want it to show at real height and width. I've tried absolute layout, relative, and stack, nothing works. Here's my current code:
<controls:GestureFrame x:Name="GestureFrameMain">
<Image x:Name="ImageMain"/>
</controls:GestureFrame>
and in the backend, I simply set the source:
ImageMain.Source = Xamarin.Forms.ImageSource.FromUri(new System.Uri(PageParametersImageZoom.Image.BigImageURL));
I can verify that the URL has an image that is much larger than the screen size, here's an example of an image that would come back:
http://www.stage.newser.com/image/1088966-0-20161020082458.jpeg
And as you can see it's much larger than the dimensions of the screen, however, when I set the source, the image appears to be at screen size. I've attached an image of the result on the page, which clearly shows the image being downsized by Xamarin.
EDIT the pinch and pan itself is not the problem. When I pinch/pan the image obviously gets larger and goes off screen. I am talking about the initial load of the page, I would like the image to show at its real size.
Looks like the only way I was able to do this was by using a AbsoluteLayout and specifying the widhrequest/heightrequest properties on the image.

How to fade a part of an object or image in corona sdk when move it?

I have a question in corona sdk. I need to fade top part of an object (like 60px of 250px) when moving the object to top before it goes out of the screen.
In another word, I need to set a display area for an image or object which its height is more than screen height. Like a top padding space which image will be faded when moving out of the display area (not the screen area)
Any tutorial or suggestion?
Sounds like image masks are exactly what you need.
In your case you would need to set the mask when moving the object to top, unset it when it comes back.
You can check the documentation for masks here:
http://docs.coronalabs.com/guide/media/imageMask/index.html

How to implement panning like google maps in SVG

I have done zooming in SVG chart. Please refer below screenshot.
above screenshot series is zoomed state.i used clipping concept to hide the outside lines from chart area after zooming.
i need to do panning here ? how can i implement like google maps. when i start pan to move the series and see the zoomed chart of another area.
how can i perform "translate" operation for path element in SVG. element in the screenshot is called series (i.e. data points /line).
i need to move the element zoomed area based on mouse movec(i.e. like scrolling the hidden content).
Is "translate" attribute is used to view the other zoomed area ? how can i perform "translate" in path element that will make the panning.
Normal chart screenshot.
Zoomed Screenshot.
Please refer below link.
http://www.cyberz.org/projects/SVGPan/tiger.svg
Thanks,
Siva
First be sure:
Download svgpan.js file in your project location
is must be the right place in your code
You must add this: xmlns:xlink="http://www.w3.org/1999/xlink"

Embedding a zoom box in an SVG image

I'd like to make my SVG images interactive, with a zoom box that can be moved around by hovering or clicking the mouse in certain areas. Can this be done in a single SVG file, so that I can embed this interactive SVG image in a pdf?
You mean like this? Zoom and Pan

How to implement a layout like the new layout of google images?

When the width of the brower is changed, the image's width or height is also changed dynamically, anyone knows how to do it?
And I found the image's max height of each rows is not the same.
Thank you very much.
I am sure Google's image application is a little more complicated than can be written in a single post, but you could mimic some of the effect with some clever use of jQuery. Here's a quick tutorial on a resizeable image grid using a slider -
Image resize tutorial
You would need to change the trigger from a slider to the resize event, but this has the basics you need.

Resources