GWT and animated gif: how to display individual frames? - gwt

Using GWT, is it possible to use an animated gif and display only a specific frame from it? For example, to display frame 4 and then later on display frame 5. Do we have control over the individual frames of an animated gif in GWT?

No, it's not possible in GWT, and it's not possible in JavaScript either.
As Cory suggested, you can split a GIF into individual frames on a server side, and then serve individual images based on browser events.

Related

How to insert clickable points in an image in flutter?

I want to do just that on the flutter, can anyone help me?
Clickable Marked points on an Image
Hello, I need to show an image with clickable dots on the screen and trigger an action when the user clicks on these dots. I heard that it is made with SVG, I've searched in several places but I find no solution in the flutter.
I was struggling with a similar situation.
Slah's solution --- put a operational layer on top of the background image --- works if you don't need pinch to zoom the image, but in my case the positioned widgets get invalid when zooming in the image.
My solution is embedding the image into a webview, you may use webview_flutter because it can be easily plugged onto your widget tree, but I think in your case flutter_webview_plugin works too since you just need to listen to some click events. Add hyperlinks to the elements to be clicked, then play with the click event by webviewcontroller(webview_flutter) or onUrlChanged Stream(flutter_webview_plugin).
One benefit you can get immediately is the ability to use .svg without any other packages by Uri.dataFromString('<html><svg>some svg codes</svg></html>', mimeType: 'text/html').toString()
Then you have full control of the appearance(via css) and the behavior(via javascript). e.g.You may define irregular areas to be clickable, and responsive to clicks.

Is there any pre-built sample of iphone like bottom navigation using CSS 3?

Is there any pre-built sample of iphone like bottom navigation using CSS 3? is it possible to make these icons in CSS3, without images?
You may want to check out Sencha Touch, they provide a full HTML5 version of many common UI components for mobile web site development, including tab bars.
Try my itabbar www.itabbar.com
Here a full css tabbar with jquery to change button color on click
http://jsfiddle.net/onigetoc/4CgxM/ (View on Chrome or Safari)
I think this is possible to reproduce the basic icon with basic shapes in css
For the moment I havec make the most basic look hat http://frommelt.fr/exos/icon.html
Of curse I don't lets go and I will make the other :)
Actually, in ChocolateChip-UI we use SVG images as background image masks and CSS3 background gradients to exactly recreate the iPhone toolbar icons. Webkit background image masks with with background images and background colors. Since CSS3 gradients are rendered by the browser as a canvas background image, they work just fine. The svg images are just black and transparent because they were created to use as masks with background colors.
That said, yes you could reproduce the images with just HTML elements and CSS. It would require a bunch of pieces, using a mix of relative and absolute positioning and would be very, very tedious to get all the pieces positioned properly and get the background gradients to match up perfectly. And then you would have to write some really complicated CSS to handle the hover state. I could do that but would I want to? Hell no! Using the SVG image masks is just so much easier. And because the SVG is just text, it's easy to edit them at any time. Oh yeah, and SVG is vector-based so you can scale them to any size without pixelation.

Multi changeable areas of a image on a iPhone

I have an image with picture of a person and I want to let the user to pick some area of the person and change the color. But how can I best create a multi-mask image?
E.g. should the user be able the change the color for a leg or a hand.
I am using Titanium Appcelerator, and right now I had a solution with buttons placed over the image, which is not a pretty and accepted solution.
The Kitchensink example, has only one area which can be changed.
The only solution I found for working with sections of an image is to divide the image into different views then use a vertical or horizontal view to glue them together. Sounds like you took a similar approach using buttons.
Another option might be to use one of the jQuery image libraries within the webview. This most likely will have a performance penalty though.

custom button with multiple images

i have 3 images that i would like to use them to generate my custom button. my images are left.png 5x20, right.png 5x20 and mid.png 1x20. my mid.png must be repeated as long as my text lenght. how can i generate it in iphone application on the fly?
thanks.
Look at the leftCapWidth property on UIImage. You need to combine the images into a single PNG file, and then tell it the pixel width of the left part using that property. Then when that UIImage is drawn, it'll resize correctly.

zooming of pdf file

Looking at the QuartzDemo sample application, I love the speed of the PDF rending using quartz alone (that is, without using uiwebview). However, when I'm zooming in the PDF it doesn't seem to become more clear like it does in PDF view.
The simplest way to do achieve this is to implement a CATiledLayer based View and add it as subview of a UIScrollView.
Set the levelsOfDetail to 3 and levelsOfDetailBias to 2 for example (one zoom out level and two zoom in level).
The UIScrollView and CATiledLayer classes will do all the job for you :-)
It's actually just zooming in on a pre-rendered image of the PDF, so it's akin to scaling up a png or similar. To actually zoom the PDF you need to re-render the pdf at a larger scale factor and display only the rect that should be visible.