Moving context of image JavaFX - image

I want to create program to zoom and displacement a context of photo. Something like in Google Maps - when I clicked on map and move mouse the content of map is changing. I want the same result in my program. Zoom works good for me. How can I solve that? For now I have a program to move all image not only context of this...
Thanks for helps!

Related

How to do a scale open animation in Flutter?

I'm trying to do this animation in flutter :
https://material.io/guidelines/motion/choreography.html#choreography-creation
My problem is that I have absolutely no idea how to do that.
As far as I know, widgets in flutter don't know their position nor the position or other widgets at all.
And you can't access context.size inside the build method.
I tried to use Hero animation to do it. Or ScaleTransition. But it's definitely not working.
You can use showMenu to dynamically show a popup menu at a given location. Consider using PopupMenuButton, which is an IconButton that automatically shows a menu when it is tapped. There's an example in the Gallery. If showMenu doesn't do what you want, you can copy the code in popup_menu.dart and customize it to make your own version. It uses CustomSingleChildLayout and PopupRoute.
If you just want to absolutely position a Material or Card on top of other elements, you can give it some elevation and use a Positioned within a Stack. You can use an AnimatedSize to adjust the element's size with a Curve. This won't interact with the back button on Android automatically, so if you want that, you may have to use addLocalHistoryEntry or PopupRoute.
If I understand you correct - you want to show square widget, and animation is not suitable at most because widget doesn't know its size.
In this case you can try MediaQuery.of(context).size.width - it returns width of your screen, so you can use it for calculating widgets size

save current view to bitmap WP7

I just started to WP7 Dev, and I would like a bit of help on solving this:
I have a Canvas in wich I have 2 StackPanels where I draw like 10 Rectangle. So my question is, how do I save the canvas to a Bitmap?
here is what I want to achieve, that from this:
I get this:
Any help that points me in the right direction would be much appreciated.
What you want to do is to create a WriteableBitmap and then call it's Render method with the UIElement you want to render to it.

drag images onto a map

I need to implement a feature where images can be geotagged. I want to drag and drop images(one or more images can be selected from the list) onto the map. Then the selected images should be geo tagged automatically to the point where they are dropped.
Can someone give me an idea on how to work on this.
Thanks
Yes, you can do this with HTML and Javascript.
I would advice you to use the jquery libary.
What you do is render the map where you want to place an image(for this example new york city)
What you do is use jquery to make the image you want to drop of yourself at the statue of liberty 50% opacity and draggable.
Under the image you have an in the middle of the image as a "pointer" which is not opaque.
People drag the "dot" under the image to the desired location.
When it's released you take the offset x and y, calculate that to the relative time x and y to find the geolocation and then store everything via ajax.
That's kinda the basis you'll have to work on to accomplish this.
It's a fun project though, but a bit timeconsuming.

Grow Images on Hover like Google Images

Hey everyone, I am trying to accomplish something with images growing on hover like the fancy grow mouseover effect on google images.
Here is what I have:
http://www.1stbusinessneeds.com/tooltip/tooltip.html
The tooltip is offset and is based on the walter zorn tooltip. What's the best way to have the mouseover popup grow out just like google images (with the text), instead of following the mouse?
(I still need it done with the same tooltip - maybe overwrite it, but it must be present to pass the text and image, it's just the positioning and display method of it that I need help creating, any samples would be appreciated)
You might want to look at JQuery.
this might be a good start http://jsfiddle.net/ZwhEu/

Qt - Drawing a Rect/Frame out of a bigger Pixmap image

I've been banging my head about this seemingly easy task and I could really use some help.
I have a wide Image loaded in the gui (using the designer..) and I want to be able to draw only a portion of it, a rectangle.
I need to be able to change this rectangle position over the large image, in order to draw a different part of the larger image at will. In this process the rect must maintain its size.
Using the Ui::MainWindow object I'm able to access the label holding the image and a solution that involves using this option is preferred (in order to keep up with the rest of the code I've already written )
Any solution will be much appreciated :)
Thanks,
Itamar
I would definitely (for ease of use) just place an empty label as placeholder in Designer.
Then implement the paintEvent for this label (delegate it to your own method). You'll have also have to look into QPainter, QPixMap, etc... Should be doable based on these hints and the documentation.
If you want more, I suggest you provide a small code snippet to work upon.
If you want to do this more or less purely through designer, you could put a QScrollArea where you want the portion of the image to appear. If you set the scroll area's scrollbar policy to be never shown, you can then manually change what part is visible via the scroll area widget. However, this would probably be more complex that creating a derived widget and reimplementing the paint function.

Resources