GtkTable overlapping widgets - c

I have a GtkTable with a background (an image widget spanning the whole dimensions of the table) and at one point I want to add another image widget on top of the background. It seems that, while I attach the second image after the background, it still shows below it. How can I deal with image priority and select which images will be shown over the others?

Related

Gtk3.0 Overlay with Labels on DrawingArea

I have created a small gtk application that displays an RTP stream in a gtk window. I am also displaying information on top of this video by using the textoverlay element provided by gstreamer. This feels like a back door since it appears to be intended for subtitles.
I would like to display my information using methods provided by gtk. I am currently trying to use the overlay container to hold the drawing area created for the video and then placing a layout container on top of that holding labels.
I am finding that the background of the layout container is being drawn on top of the drawing area, meaning blocked. If I remove the drawing area and use two layout containers with labels in them, overlapping labels are displayed the way that I would expect.
I have tried various combinations of opacity and containers with no luck.

Get current width and height of an Embed Clutter Stage

I'm using Clutter to compose an interactive/animate UI.
I'm using two box containers (ClutterBox) with an integrated FixedLayout, and I want to be able to rearrange those boxes onto screen using an hard-coded layout during (gtk-)window resizing. Searching in some gtk3 examples, I find out this can be achieved connecting the signal "size-allocate" of the GtkWindow. What I still unable to accomplish is to get width and height of the Embed ClutterStage.
I used gtk_widget_get_preferred_size passing the ClutterStage widget, but it gives back to me only the preferred size, and not the current, resized value.
Does anyone have a clue?
calling clutter_actor_get_size() on the stage returned by a GtkClutterEmbed widget is enough to get the size of the stage: the GtkClutterEmbed widget that owns the embedded stage resizes the stage every time GTK+ negotiates the geometry of the widgets of a window.
you can also use a ClutterBindConstraint object to bind the size of an actor to the size of the stage, or a ClutterSnapConstraint or a ClutterAlignConstraint objects to resize or align actors to the stage.
Try gtk_widget_get_allocation().

WPF - copying items with brushes attached

I'm developing a multi track video player in wpf and need to be able to copy the video that is playing in one grid layout of the main window into a seperate window that will go out of a projector. The videos are loaded and drawn onto rectangles using drawing brush and are added to a grid. I can't call clone on the rectangle, or the grid, or the canvas, so I'm currently resorting to copying the drawing brushes, passing them through to the otherwindow class and reassigning them to newly drawn rectangles.
However, this gets even worse as I'm 'cross-fading' between two video by drawing another rectangle with a new video in front, then changing the opacity value of the front video to gradually block out the one behind. So I now have two brushes on two rectangles tied to storyboards to animate, and I'm having to pass everything through and basically compute everything twice.
Is there any sensible way of doing this? I'd love to be able to literally grab the pixels from one area of the main video and display them in the second window, but everything seems abstracted away.
Any suggestions would be a massive help
Have you looked at VisualBrush?

WPF/C#: Images rotating from a listview?

I just want ask for your comments/suggestions on how to create a customized listview (if that's a good implementation) in WPF that displays images coming from a table from a database (more like a playlist) that rotates similar to a film (moving horizontally - on loop)
Any ideas?
If you have a list of Images, you can create an Image control for each one, put each Image control in a horizontal StackPanel, put the StackPanel inside a Canvas (of whatever size of the "film"), and animate the Left property of the Canvas to have the images roll.
Of course, if you need that the images wrap (the first one after the last one), you could forget about the StackPanel and move each Image separately.

How can I animate a transition when moving a child from one panel to another in Silverlight

I would like to animate a transition when moving content between two panels. I am getting a bit map image of a detail record and docking it as a thumbnail in the panel below. The docking area is in a footer grid and the content detail is in another grid that sits above the dock area (the dock and the main content area live in separate rows of the root layout control - another grid).
I have tried implementing this with a ScaleTransform and a TranslateTransform, simultaneously shrinking the image and moving it towards the footer control. When it moves into the footer control, it gets clipped even though the image Canvas.ZIndex property is set to a very high number. Eventually the thumnbail will need to be a child of a StackPanel that sits inside the footer grid.
Thanks for your consideration and help.
I had a similar problem (clipping) with a WPF animation I had. The problem was that the owner of the animation needed to be a parent of both containers for the animation to work (in my case I made it the actual window holding the containers).
Without any code, I can't see if that is your problem, but I thought I would throw it out there.
You can see my code where I animate moving from one container to another here:
http://wiassistant.codeplex.com/sourcecontrol/changeset/view/36638?projectName=WIAssistant#924851
(See the AnimatePaneBox method at the bottom of the file.) This may or may not be useful to you.
I've done something similar by creating a Canvas that sits over the top of both containers, using a WritableBitmap (if necessary) to create a rendering of the object that you're moving and attach it to that Canvas, animate the bitmap (translate, scale, opacity, whatever), and then pop the new object in under it at the end of the animation. It can be brittle if your controls need to be able to move or resize, but in most of my circumstances it's been a reliable hack.

Resources