Is there any way to animate (using one of the supplied Core Animations) an image change in IKImageView without resorting to using two independent IKImageViews upon a new image load?
There is no public API for that. You can only add core animation overlay/background to IKImageView.
Related
I'm currently trying to implement a virtual desktop (browser) viewer for my phone using chrome's API where captureVisibleTab() is used with mutationObservers to listen to changes in the DOM, and these changes are then transmitted via websockets. To display this, I'm attempting to create a simple rectangle and with the browser feed displayed through textures, however, I'm struggling to find documentation within three.js that will dynamically interpret and display new pictures as textures, and I realize that needsUpdate flag will need to be set to true. So I was wondering if anyone had any suggestions on how to approach this? Do I need to perhaps use loaders?
Could you assign the image data to a canvas and use that as a texture?
Something like Is it possible to use a 2d canvas as a texture for a cube?
I'm trying to save a QGraphicsScene with OpenGL as an image (png or jpeg), but I don't want the image to depend on the current view (zoom). That's why I'm not using grabFrameBuffer but I use render() instead :
QImage imgToSave(1024,768,QImage::Format_ARGB32_Premultiplied);
// fill the image
// and define rectbuffer(), the QRect() containing what I want to save
QPainter painter(&imgToSave);
m_scene = new QGraphicsScene;
// fill the Scene
m_scene->render(&painter,imgToSave.rect(),rectbuffer());
It does work. My question is: is it using OpenGL capabilities or not?
If not, how to do so?
n.b. : i am using a QGLWidget as a Viewport for my GraphicsView. And the display using OpenGL is working. My concerns are about the image saving.
I am going to guess: no. Because for the QGraphicsScene to render through OpenGL you need to specify a QGLWidget derived object as the viewport of the scene - you haven't, so it's almost certainly using the raster engine. Secondly the QPainter uses whatever paint device you construct it with as a backend, you have specified a straight QImage which does not use OpenGL.
If you can't/won't use a QGLWidget through a QGraphicsView, then you might be able to render onto QGLFramebufferObject. But this brings it's own complications, namely you will have to create a hidden context beforehand.
I am new to J2ME. I just want to know how to put a textfield over a background image. I tried canvas but I can only set the background image and don't know how to add a textfield above the background image. Please help me.
APPROACH I: Using high level api's like Screen, Item, etc
It is NOT feasible in Java ME (CLDC) using high level api's like screens, items, etc are laid out on the display with default device styling and without the extensive layout support like Swing.
APPROACH II: Using low level api's like Canvas
To use the low level api's you need to create custom components like in J4ME. In their you layout the Canvas and paint the components on the top. So in your case you can render the image of the size of Canvas and then render the components on top of it.
NOTE: Please keep in mind this a very tedious and not so rewarding process.
APPROACH III: Use third party library
High Rated UI libraries: LWUIT and J2ME-Polish
SO: JavaME UI Libraries
I have a squared formed image. I need to add perspective view to it and then make an animation that will restore image back to square view. This actions must work at least in all newest versions of browsers and without Flash.
I have tried to do this as follows:
Using RaphaelJS I can only clip image (create path and set fill to image url), not add perspective.
Canvas works as svg and vml in RaphaelJS... I can't add perspective with it's help.
CSS3 3D animation method rotateX adds perspective, but it is supported only by Chrome and Safary.
There is no way to add perspective to image using built in tools.
The only possible solution, I have found is using SVG add clip path to image - it doesn't add perspective view, but it's the best possible solution.
As I understand - we can use Canvas to add perspective, but you must write your own javascript algorithm to transform plain image to perspective view.
I'm creating an in-car control screen (will be run from a Mac Mini) and am looking for some libraries or code samples for "effects". For example, I might want the name of the current track playing to fly in from the right. I might want screens to fade or slide up, etc.
I am aware that I can manually write these effects in Objective-C.
I am hoping there is a library like scriptaculous for JavaScript that allows me to easily manipulate an existing TextView, ImageView, etc.
A framework or otherwise is preferred. I'm working in native cocoa. I don't mind if the library costs $.
Thanks,
Rick
Have a look at Core Image and Core Animation, both of which will allow you to add visual effects. Core Image, as its name implies, works with images only but can do fancy transitions. You can "fake" UI animations with it though by rendering a view to an image, swapping the image in in place or over the top of the view and then running a transition to another view.
Core Animation works directly with Cocoa Views and does have some transitions available. Both APIs (especially Core Animation) are fairly complex and have a learning curve.